mirror of
https://github.com/lutris/lutris
synced 2024-09-28 20:13:32 +00:00
Remove restore gamma option + cleanup docs
This commit is contained in:
parent
0038098eab
commit
99e3bca49e
|
@ -277,21 +277,11 @@ has known regressions with the current default build. Abusing this feature
|
|||
slows down the development of the Wine project.
|
||||
Example: ``version: staging-2.21-x86_64``
|
||||
|
||||
``Desktop``: Run the game in a Wine virtual desktop. This should be used if the
|
||||
game has issues with Linux window managers such as crashes on Alt-Tab.
|
||||
Example: ``Desktop: true``
|
||||
|
||||
``WineDesktop``: Set the resolution of the Wine virtual desktop. If not provided,
|
||||
the virtual desktop will take up the whole screen, which is likely the desired
|
||||
behavior. It is unlikely that you would add this directive in an installer but
|
||||
can be useful is a game is picky about the resolution it's running in.
|
||||
Example: ``WineDesktop: 1024x768``
|
||||
|
||||
``dxvk``: Use this to disable DXVK if needed. (``dxvk: false``)
|
||||
|
||||
``dxvk_version``: Use this to define a specific DXVK version. (``dxvk_version: 1.10.3``)
|
||||
|
||||
``esync``: Use this to enable esync. (``esync: true``)
|
||||
``esync``: Use this to disable esync. (``esync: false``)
|
||||
|
||||
``overrides``: Overrides for Wine DLLs. List your DLL overrides in a
|
||||
mapping with the following values:
|
||||
|
@ -321,15 +311,6 @@ customization of system features. As with runner configuration options, system
|
|||
directives should be used carefully, only adding them when absolutely necessary
|
||||
to run a game.
|
||||
|
||||
``restore_gamma``: If the game doesn't restore the correct gamma on exit, you
|
||||
can use this option to call xgamma and reset the default values. This option
|
||||
won't work on Wayland.
|
||||
Example: ``restore_gamma: true``
|
||||
|
||||
``terminal``: Run the game in a terminal if the game is a text based one. Do
|
||||
not use this option to get the console output of the game, this will result in
|
||||
a broken installer. **Only use this option for text based games.**
|
||||
|
||||
``env``: Sets environment variables before launching a game and during install.
|
||||
Do not **ever** use this directive to enable a framerate counter. Do not use
|
||||
this directive to override Wine DLLs. Variable substitution is available in
|
||||
|
@ -345,8 +326,6 @@ Example::
|
|||
``single_cpu``: Run the game on a single CPU core. Useful for some old games
|
||||
that handle multicore CPUs poorly. (``single_cpu: true``)
|
||||
|
||||
``disable_runtime``: **DO NOT DISABLE THE LUTRIS RUNTIME IN LUTRIS INSTALLERS**
|
||||
|
||||
``pulse_latency``: Set PulseAudio latency to 60 msecs. Can reduce audio
|
||||
stuttering. (``pulse_latency: true``)
|
||||
|
||||
|
@ -354,12 +333,6 @@ stuttering. (``pulse_latency: true``)
|
|||
game is running. Useful for games that handle other layouts poorly and don't
|
||||
have key remapping options. (``use_us_layou: true``)
|
||||
|
||||
``xephyr``: Run the game in Xephyr. This is useful for games only handling 256
|
||||
color modes. To enable Xephyr, pass the desired bit per plane value. (``xephyr: 8bpp``)
|
||||
|
||||
``xephyr_resolution``: Used with the ``xephyr`` option, this sets the size of
|
||||
the Xephyr window. (``xephyr_resolution: 1024x768``)
|
||||
|
||||
|
||||
Fetching required files
|
||||
=======================
|
||||
|
|
|
@ -26,7 +26,7 @@ from lutris.runners import import_runner
|
|||
from lutris.runners.runner import Runner
|
||||
from lutris.util import audio, discord, extract, jobs, linux, strings, system, xdgshortcuts
|
||||
from lutris.util.display import (
|
||||
DISPLAY_MANAGER, SCREEN_SAVER_INHIBITOR, disable_compositing, enable_compositing, restore_gamma
|
||||
DISPLAY_MANAGER, SCREEN_SAVER_INHIBITOR, disable_compositing, enable_compositing
|
||||
)
|
||||
from lutris.util.graphics.xephyr import get_xephyr_command
|
||||
from lutris.util.graphics.xrandr import turn_off_except
|
||||
|
@ -911,9 +911,6 @@ class Game(GObject.Object):
|
|||
with subprocess.Popen(["setxkbmap"], env=os.environ) as setxkbmap:
|
||||
setxkbmap.communicate()
|
||||
|
||||
if self.runner.system_config.get("restore_gamma"):
|
||||
restore_gamma()
|
||||
|
||||
# Clear Discord Client Status
|
||||
if settings.read_setting('discord_rpc') == 'True' and self.discord_id:
|
||||
discord.client.clear()
|
||||
|
|
|
@ -270,16 +270,6 @@ system_options = [ # pylint: disable=invalid-name
|
|||
"closed or when they crash. This is when this option comes \n"
|
||||
"into play to save your bacon."),
|
||||
},
|
||||
{
|
||||
"section": _("Display"),
|
||||
"option": "restore_gamma",
|
||||
"type": "bool",
|
||||
"default": False,
|
||||
"label": _("Restore gamma on game exit"),
|
||||
"advanced": True,
|
||||
"help": _("Some games don't correctly restores gamma on exit, making "
|
||||
"your display too bright. Select this option to correct it."),
|
||||
},
|
||||
{
|
||||
"section": _("Display"),
|
||||
"option": "disable_compositor",
|
||||
|
|
|
@ -47,17 +47,6 @@ def get_default_dpi():
|
|||
return 96
|
||||
|
||||
|
||||
def restore_gamma():
|
||||
"""Restores gamma to a normal level."""
|
||||
xgamma_path = system.find_executable("xgamma")
|
||||
try:
|
||||
subprocess.Popen([xgamma_path, "-gamma", "1.0"]) # pylint: disable=consider-using-with
|
||||
except (FileNotFoundError, TypeError):
|
||||
logger.warning("xgamma is not available on your system")
|
||||
except PermissionError:
|
||||
logger.warning("you do not have permission to call xgamma")
|
||||
|
||||
|
||||
def has_graphic_adapter_description(match_text):
|
||||
"""Returns True if a graphics adapter is found with 'match_text' in its description."""
|
||||
for adapter in _get_graphics_adapters():
|
||||
|
|
|
@ -38,7 +38,6 @@ SYSTEM_COMPONENTS = {
|
|||
"lsi-steam",
|
||||
"Xephyr",
|
||||
"nvidia-smi",
|
||||
"xgamma",
|
||||
],
|
||||
"TERMINALS": [
|
||||
"xterm",
|
||||
|
|
|
@ -1,3 +1,44 @@
|
|||
No one knows what this file does or how to use it
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$schema: "http://json-schema.org/draft-07/schema"
|
||||
$comment: "As per https://github.com/lutris/lutris/blob/bd92a295a77484c2ea1f6ef6140d25057f24965a/docs/installers.rst"
|
||||
required:
|
||||
|
@ -448,32 +489,18 @@ properties:
|
|||
properties:
|
||||
env:
|
||||
$ref: "#/definitions/env"
|
||||
restore_gamma:
|
||||
type: boolean
|
||||
description: Enable calling xgamma and reseting the default values
|
||||
terminal:
|
||||
type: boolean
|
||||
description: Run the game in a terminal if the game is a text based one
|
||||
single_cpu:
|
||||
type: boolean
|
||||
description: Run the game on a single CPU core
|
||||
disable_runtime:
|
||||
type: boolean
|
||||
description: DO NOT DISABLE THE LUTRIS RUNTIME IN LUTRIS INSTALLERS
|
||||
pulse_latency:
|
||||
type: boolean
|
||||
description: Set PulseAudio latency to 60 msecs
|
||||
use_us_layout:
|
||||
type: boolean
|
||||
description: Change the keyboard layout to a standard US one while the game is running
|
||||
xephyr:
|
||||
type: string
|
||||
description: To enable Xephyr, pass the desired bit per plane value
|
||||
examples: [ "8bpp" ]
|
||||
xephyr_resolution:
|
||||
type: string
|
||||
description: The size of the Xephyr window
|
||||
examples: [ "1024x768" ]
|
||||
wine:
|
||||
$ref: "#/definitions/wine-runner"
|
||||
|
||||
|
|
Loading…
Reference in a new issue