-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak tweaks #355
Tweak tweaks #355
Conversation
I'm thinking about new tweaks format and that's what I came up with: {
"id": "dxvk_hud",
"name": "DXVK: Show HUD",
"description": "Enable DXVK HUD",
"url": "https://github.com/doitsujin/dxvk#hud",
"group": "DXVK",
"applicable_to": {
"platforms": ["windows"],
"compat": ["wine", "proton"]
},
"requires": {
"kmod": ["some_kernel_module", "or_alternative"],
"executable": ["some_executable", "or_alternative"]
},
"env": {
"DXVK_HUD": "${option:hud}"
},
"command": "some_executable --option ${option:some_option} ${command}",
"options": {
"hud": {
"description": "HUD elements",
"type": "list",
"separator": ",",
"values": {
"devinfo": "Show name of GPU and driver version",
"fps": "Show frame rate",
"frametimes": "Show a frame time graph",
"submissions": "Show number of command buffers submitted per frame",
"drawcalls": "Show number of draw calls and render passes per frame",
"pipelines": "Show total number of graphics and compute pipelines",
"memory": "Show amount of device memory allocated and used",
"gpuload": "Show estimated GPU load. May be inaccurate",
"version": "Show DXVK version",
"api": "Show D3D feature level used by the application",
"compiler": "Show shader compiler activity",
"samplers": "Show current number of sampler pairs used [D3D9 Only]"
},
"presets": {
"default": {
"name": "Default",
"description": "Show name of GPU, driver version and frame rate",
"value": "devinfo,fps"
},
"full": {
"name": "Full",
"description": "Show all available HUD elements",
"value": "full"
}
}
}
}
}
I think it should look somewhat like this:
|
I somewhat have the feeling that a group and multiple options are doing both the same things. Take a look at the following two examples, aren't they doing the same? Two combining into one group{
"id": "dxvk_hud",
"group": "DXVK",
"env": {
"DXVK_HUD": "${options:hud}"
},
"options": {
"hud": {
"description": "HUD elements",
"type": "list",
"separator": ",",
"values": {
"devinfo": "Show name of GPU and driver version",
"fps": "Show frame rate",
"frametimes": "Show a frame time graph",
"submissions": "Show number of command buffers submitted per frame",
"drawcalls": "Show number of draw calls and render passes per frame",
"pipelines": "Show total number of graphics and compute pipelines",
"memory": "Show amount of device memory allocated and used",
"gpuload": "Show estimated GPU load. May be inaccurate",
"version": "Show DXVK version",
"api": "Show D3D feature level used by the application",
"compiler": "Show shader compiler activity",
"samplers": "Show current number of sampler pairs used [D3D9 Only]"
},
"presets": {
"default": {
"name": "Default",
"description": "Show name of GPU, driver version and frame rate",
"value": "1"
},
"full": {
"name": "Full",
"description": "Show all available HUD elements",
"value": "full"
}
}
}
}
}
{
"id": "dxvk_log",
"group": "DXVK",
"env": {
"DXVK_LOG_LEVEL": "${options:log}"
},
"options": {
"log": {
"description": "Log elements",
"type": "one only",
"values": {
"none": "Log nothing",
"error": "Log error messages",
"warn": "Log warnings",
"info": "Log info messages",
"debug": "Log debug messages",
}
}
}
} One with multiple options{
"id": "dxvk",
"env": {
"DXVK_HUD": "${options:hud}",
"DXVK_LOG_LEVEL": "${options:log}"
},
"options": {
"hud": {
"description": "HUD elements",
"type": "list",
"separator": ",",
"values": {
"devinfo": "Show name of GPU and driver version",
"fps": "Show frame rate",
"frametimes": "Show a frame time graph",
"submissions": "Show number of command buffers submitted per frame",
"drawcalls": "Show number of draw calls and render passes per frame",
"pipelines": "Show total number of graphics and compute pipelines",
"memory": "Show amount of device memory allocated and used",
"gpuload": "Show estimated GPU load. May be inaccurate",
"version": "Show DXVK version",
"api": "Show D3D feature level used by the application",
"compiler": "Show shader compiler activity",
"samplers": "Show current number of sampler pairs used [D3D9 Only]"
},
"presets": {
"default": {
"name": "Default",
"description": "Show name of GPU, driver version and frame rate",
"value": "1"
},
"full": {
"name": "Full",
"description": "Show all available HUD elements",
"value": "full"
}
}
},
"log": {
"description": "Log elements",
"type": "one only",
"values": {
"none": "Log nothing",
"error": "Log error messages",
"warn": "Log warnings",
"info": "Log info messages",
"debug": "Log debug messages",
}
}
}
} |
ad13170 implements tweaks grouping. Do you think it's good enough for now or is |
I guess it's fine as long as all options aren't excluding others. But I also don't have examples for this case other than log level which wouldn't really fit into this list anyway. Shall I rebase onto the refactoring branch? Maybe add some others, vkBasalt, Mumble, ideas? |
Initial Tweak options UI (#355)
c16b87b implements executable and kernel module requirements for tweaks. It also implements initial UI for options: |
Something visually:
Something logically:
Something practically:
|
Popover menu API is very weird and I can't find any good example on how to create checkboxes and radiobuttons dynamically in code without using .ui layouts.
How about a different syntax for options? Variables are currently
Not sure if it's possible to solve for old menus without horrible hacks. Again, something custom is probably needed.
Good point.
That's a good idea. I don't think updates will be a huge problem, bundled tweaks shouldn't change too much. |
Here are various examples. These examples generate them without .ui layouts:
AFAIK you can use any container inside a popover and it seems a gtk.menu… |
This looks pretty neat with the popover, it's a great visual upgrade. I've recreated your test cases here and Test option 1 and 2 are looking good. The spacing makes sense between the options and presets/value pane and it's mostly possible to read everything. Visual things:
I've also tried to give MangoHud some more options to test this. Sadly I wasn't that successful overall. Here are some issues I had:
While the things mentioned related to MangoHud are probably overkill (again, pls ignore if too much) the three paned layout isn't the best possible way to present the options overall IMHO. With only two options and two presets most of the space is empty.
|
I think that should be good enough for now (3dbccd3). Some empty space in options list is ok.
This will increase number of clicks and it may be harder to understand if presets and values are in additional submenus.
Presets should probably be enough for most cases, but maybe I'll add support for string options later.
I think so, but it may not work correctly if program (MangoHud in this example) doesn't handle weird cases like multiple consecutive separators ( |
Test option code"fps_limit": {
"name": "FPS limit",
"type": "string",
"value": "fps_limit=${value}",
"presets": {
"240": {
"name": "240 FPS",
"value": "fps_limit=240"
},
"144": {
"name": "144 FPS",
"value": "fps_limit=144"
},
"120": {
"name": "120 FPS",
"value": "fps_limit=120"
},
"60": {
"name": "60 FPS",
"value": "fps_limit=60"
},
"30": {
"name": "30 FPS",
"value": "fps_limit=30"
}
}
} |
That's great, I guess everything should now be possible input-wise. While adding my stuff I often struggled if I should add the options separately grouped or as a single slider with multiple options. Do you advise one over the other? Should I combine all proton settings into one slider, as in libstrangle? Everything combined seemingly has the advantage of a sorting which corresponds to the underlaying json. Things to note:
|
I think separate tweaks are better if they are a single binary state (on/off). I've changed some NVIDIA options into separate tweaks because I think it should be easier to understand.
Fixed. I think we should try to reduce the number of groups though.
Tweaks are sorted now. |
We can move the dxvk hud to the other overlays.
Well, the vblank option is tied to gsync so currently the meaning is a bit off. Maybe we should scrap both gsync options as it's likely already set in the nvidia-settings.
Agreed. Maybe just a different branch with only tweaks is already enough. Personally I'm not a big fan of putting these things in the wiki because in a repo or branch it's much easier to get and update the files. (no manual copying required) Also I'm sorry, I did a mistake in the winedlloverrides. |
I don't think that Wine tweak is even needed since overrides are already set in code: https://github.com/tkashkin/GameHub/blob/refactoring/src/data/compat/Wine.vala#L259 |
Then again, sorry, I wasn't aware of that (or forgot). |
Remove some of the less useful tweaks (#355)
TweaksList: sort tweak groups by name
Tweak options: saving/restoring Tweak states (`enabled`/`disabled`/`global`)
86e59c3 implements saving and restoring tweak options. Also tweak state for games is |
86788a0 reenables some of the functionality that was disabled due to refactoring. Now Remove old I'm not sure how to handle tweak options when tweak state for game is
|
I actually had to rethink this multiple times. Looking closely a game tweak can have four states:
And while having these states for tweaks they would also exist for every option inside a tweak.
So IMHO it depends on what you want, support ambiguous options or not. Did I answer the question? If not: please elaborate a bit more. Notes:
|
So this is probably the most intuitive and the easiest to implement solution:
I don't really know how to show global states, there's a tooltip, but it would be nice if these states were somehow more visible. Any ideas? |
How about a simple checkbox or "toggle button" to toggle the global state - they clearly look pressed or ticked on/off and also provide a way to reset without an additional button. Other than that it has to be some visual indicator. Lutris does this by making the setting bold and providing a button to reset which also isn't that intuitive. Other possibilities are underline or italic as well as a different text or background color. |
…m global (#355) GamePropertiesDialog: Executable tab
I don't really see how it should look and where to put it. I'm also not sure if "Reset to global" functionality is really needed, it will just complicate UI even more imo.
The only solution I can think of is to show tweak state as text near tweak title or description like additional info is already shown in installers list in game installation dialog. |
Without that it would never be possible to go out of the special state and let the game tweaks represent the global state again. May it because accidental misclicking or changing their mind. Maybe making one reset button / switch for all game tweaks is worth a thought. Basically activating or deactivating all game tweaks at once bringing them into their forced on/off state based on the global default or being able to reset them all at once.
Also not too bad, that would at least make immediately clear what it's representing. But would be bad if it's always hidden in the tooltip because the descriptions are too long.
Sry, scrap that, I looked at the old window. |
Looks good and fitting and I like that you can also find that button on the global tweak list :) Not sure how ready it is: Switching the game tweak or option also switches the global tweak or option. |
GameInstallDialog/InstallTask: support install_dir import
748c4f7 fixes some bugs for tweak options, was that it or did I miss something else?
I don't like this idea. Start of the description is usually enough to understand it, full description is shown in the tooltip if it's needed. |
It's still the same with 0.16.0-d2ec729? https://i.imgur.com/X5pzNTW.mp4 (dunno where that glitching comes from, pls ignore)
That's totally fine.
Did you decide on this? I would like to try making the bundled tweaks more complete in the branch/repo/wiki if that's something you'd like to have. |
…serializing and deserializing them (#355)
Should be fixed by 9458fb8.
You can add new tweaks to this PR for now and I'll think where to put them later. |
Well, that was a mistake… Let me know if I should create a new PR. https://github.com/Lucki/GameHub/tree/more_tweaks |
TweaksList: sort tweak groups by name Former-commit-id: f590902
Tweak options: saving/restoring Tweak states (`enabled`/`disabled`/`global`) Former-commit-id: 86e59c3
GameInstallDialog/InstallTask: support install_dir import Former-commit-id: 748c4f7
Move dxvk options into its own file and fill both with a more complete option set.
Including all of these will clutter the tweak window a lot so this needs some sort of grouping before merging.
While writing I've noticed the two options
1
andfull
which both can function as a master switch to hide the underlying grouped options like a sane default. Related to #326 (comment)I can't get
PROTON_LOG=1
to work. The closest I get was by also settingSteamGameId=gamehub
but this prevents proton from running without the steam client open.