Commit graph

9901 commits

Author SHA1 Message Date
Mathieu Comandon f5373eaaa2 Remove Prime option 2024-02-23 13:43:45 -08:00
Mathieu Comandon 8fcc7f3fb3 Rename method 2024-02-23 13:43:45 -08:00
Daniel Johnson df325b3658 Reduce the scope of the restored 'dri_prime' option to just 'prime'
That's a slightly different 0.5.16 option, and it controls only the __NV_PRIME_RENDER_OFFLOAD __VK_LAYER_NV_optimus env-vars; I think __GLX_VENDOR_LIBRARY_NAME applies outside of this one feature.

This should allow the use of discrete GPUs- without the crashy env-var.
2024-02-23 13:43:45 -08:00
Daniel Johnson 4fdc8eb7b7 Restore the old "dri_prime" system option.
However, it now controls the new prime activation code, which works only with an explicit GPU choice, so I've added a warning about that.

There's no separate "prime" option; "dri_prime" can now handle both the NVidia and not-so-NVidia cases. I've not restored the 'optimus' options either.

This change means the __NV_PRIME_RENDER_OFFLOAD is not set by default, because that causes crashes on mono-GPU NVidia systems.

Resolves #5304
2024-02-23 13:43:45 -08:00
Daniel Johnson 5373278617 Release DB_LOCK even if an exception occurs executing a query. 2024-02-23 13:43:45 -08:00
Daniel Johnson ada86795a9 Cache the compositore start/stop commands.
This isn't for performance; we need to commands to be stable so when we restart the compositor, we're using the command we got when we stopped it.

But the compositor is not likely to change while we run, so a simple global cache should do fine.
2024-02-23 13:43:45 -08:00
Mathieu Comandon ff7998b9b0 Also limit games sent by the client in incremental updates 2024-02-23 13:43:45 -08:00
Mathieu Comandon c6c9956dfa Standardize data on both sides 2024-02-23 13:43:45 -08:00
Mathieu Comandon 2c1a2b2177 Implement incremental sync 2024-02-23 13:43:45 -08:00
Mathieu Comandon b773c03831 Improve adding games locally 2024-02-23 13:43:45 -08:00
Mathieu Comandon 003b6c268a Add missing playtime to created games 2024-02-23 13:43:45 -08:00
Mathieu Comandon 41472a7755 Also include playtiem 2024-02-23 13:43:45 -08:00
Mathieu Comandon f057e93064 Only sync played games 2024-02-23 13:43:45 -08:00
Mathieu Comandon 9e5a5cf1f6 Sync local library with remote 2024-02-23 13:43:45 -08:00
Mathieu Comandon 4ef7638fd9 Remove setup exes from exe candidates 2024-02-23 13:43:45 -08:00
Mathieu Comandon 115c99fb43 Add sync button to accounts section 2024-02-23 13:43:45 -08:00
Daniel Johnson bde8eac977 Fix the casing of paths in the path-cache for wine games only.
This is just when updating the path cache, but it should prevent unusable paths getting in there when they would have worked with actual Wine.

Fixes #5309, or at least prevents it going forward.
2024-02-23 13:43:45 -08:00
Mathieu Comandon 90ac1aea3a Update Lutris library API view + add section in Accounts preferences for Lutris sync 2024-02-23 13:43:45 -08:00
GloriousEggroll e34466c848 differentiate between GE-Proton* builds and lutris-GE-Proton* wine builds when detecting if ULWGL should be used 2024-02-23 13:43:45 -08:00
Daniel Johnson 92b51ac3f4 Automatically slugify user-entered slugs on focus-out and before use.
This will provide a consistent slug during install, and also gives users a little feedback about what the slug is going to be.
2024-02-23 13:43:45 -08:00
Daniel Johnson cb88e1910e Clear the cached Wine default version when we re-download the versions.json file.
This was causing mismatches where we'd ask for a version of Wine that was no longer available. Let's not do that.
2024-02-23 13:43:45 -08:00
Daniel Johnson 3ab83504f2 Rework get_default_runner_version_info() to avoid failure when 'versions.json' is stale.
Even if it is stale, even whe a specific version is requested, we'll try to satisfy version info request from the cache and hit the API only if this fails.

This commit also breaks out the code to parse out the architecture from the version, and uses this in the runner-version dialog too.

 That bit uses Optional[str], which is not ideal, but I haven't figured out a better way here. Just using '' instead is cheating, a None spelled differently.
2024-02-23 13:43:45 -08:00
Daniel Johnson 4c3a36361d Make a local function a method so we can guess the right handler object for error reporting. 2024-02-23 13:43:45 -08:00
Daniel Johnson e338313839 Whitespace! My one weakness! 2024-02-23 13:43:45 -08:00
Daniel Johnson a358dc71ad Remove redundant call to MEDIA_CACHE_INVALIDATED.fire() - download_lutris_media() already does this anyway. 2024-02-23 13:43:45 -08:00
Daniel Johnson 8b82adec43 Download the media for a duplicated game in the background; there's no need to wait. 2024-02-23 13:43:45 -08:00
Daniel Johnson 53d0ed2c9c Change the default name of a duplicated game to be the same as the original - the playtime will distinguish them at least, if the user does not change the name.
Also, if the user does not pick a different name, preserve the slug also.

For issue #5303
2024-02-23 13:43:45 -08:00
Daniel Johnson 71648cf5ac Pass correct object to get_installer_runner_version()
It's supposed to be the installer not the interpreter. Looks like a copy & paste error.

Resolves #5300
2024-02-23 13:43:45 -08:00
GloriousEggroll ac96819a10 revert ~/.local/share/ULWGL path check. The plan for now is to keep using lutris/runtime/ulwgl/ and just ship ulwgl-run since it auto-extracts and updates ULWGL to the correct path anyways. 2024-02-23 13:43:45 -08:00
GloriousEggroll ad957da8c2 don't override gstreamer for proton runners 2024-02-23 13:43:45 -08:00
GloriousEggroll bb77dcddf3 whoops, fix this path check as well 2024-02-23 13:43:45 -08:00
GloriousEggroll a77e16f5cc fix typo 2024-02-23 13:43:45 -08:00
GloriousEggroll b6b9082f92 fix proton path check, sometimes this can be dist/bin instead of files/bin depending on if stable or bleeding edge 2024-02-23 13:43:45 -08:00
GloriousEggroll a2744070ba update ULWGL path check 2024-02-23 13:43:45 -08:00
Daniel Johnson c49927743b Expand the size of the details area in the ErrorDialog. 2024-02-23 13:43:45 -08:00
Daniel Johnson 7eff66b547 Add an expander to the error dialog that lets you see the traceback interactively.
Resolves #5295
2024-02-23 13:43:45 -08:00
Daniel Johnson f468148ddb Fix ErrorDialog parameter usage.
Pass exceptions for 'error' when possible, provide the parent when available.

Also, go ahead and mark the 'error' parameter as Union[str, BaseException]. It's ugly, but seems like the best option in the short term.
2024-02-23 13:43:45 -08:00
Daniel Johnson 1c6a36b6c6 Place a bold "Lutris has encountered an error" message at the top of the ErrorDialog by default.
There's also an explicit message_markup parameter to use to override this behavior, allowing custom markup to be used while preserving the 'Copy to Clipboard' functionality.

This is more for #5295.
2024-02-23 13:43:45 -08:00
Daniel Johnson 1b31108157 Specify the message_type for ErrorDialog.
It doesn't seem to do anything for me; not sure why. Maybe GNOME does not like icons in message boxes anymore, but I can't find documentation for this.
2024-02-23 13:43:45 -08:00
Daniel Johnson 1e60035441 Add a Copy to Clipboard button to the ErrorDialog when it is given an exception
This will copy the standard traceback stuff to the clipboard.

A step in the direction of #5295, but not as fancy as that is asking for.
2024-02-23 13:43:45 -08:00
Daniel Johnson e6a2625de4 Remove dependency on GdkX11; just look at the display class's name.
It seems pretty unlikely that a non-X11 display class would have "X11" in its name.
2024-02-23 13:43:45 -08:00
Daniel Johnson 66b0a72d53 Add some error handling for the error handling!
It's very easy to pass the error to get_error_handler(), but we want the type signature to be simple, not Union[TError, Type[TError]], so instead we'll log if you pass the exception and fix it at runtime.

We will raise another exception if you pass some random thing in as well, since the 'attribute __mro__ not found' is just confusing.
2024-02-23 13:43:45 -08:00
Daniel Johnson aeb0970b78 Convert EsyncLimitError to a registered handler.
This way when you log it there's no markup there, but if it hits the backstop we'll see the link. The game-error handler now delegates to the backstop code too.

FsyncUnsupportedError just uses the slightly longer message by default now, too. util/wine.py no longer needs to use ErrorDialog at all.
2024-02-23 13:43:45 -08:00
Daniel Johnson a01fef4442 Add registered error handlers for the backstop to provide global, custom handling for particular exceptions.
This commit handles KeyError with a more intelligible error message.

This helps with #5295, but is not really informative enough.
2024-02-23 13:43:45 -08:00
Daniel Johnson d3dc93c9cc Avoid double check for missing games
It checks when switching to the 'Missing' view, but also on start-up. If you start out on the missing view, that's two checks.

Instead, this will check when switching to the 'missing' view, or it any view if it hasn't updated yet.
2024-02-23 13:43:45 -08:00
Daniel Johnson 643e8751bd Fix badge layout when the media comes in too short.
The placement needs to be a rectangle, not just a point, to account for this.
2024-02-23 13:43:45 -08:00
Daniel Johnson cb0e95a1fa Do not crash if we wind up resetting an option that is already reset. 2024-02-23 13:43:45 -08:00
Daniel Johnson 960bbd66e8 Restrict the missing games update to just when switch to the 'Missing' view alone.
This is a lot like what 0.5.16 did, but doesn't block on check for game directories in the cell-renderer.
2024-02-23 13:43:45 -08:00
Daniel Johnson 54a868da79 Further simplifications for MissingGames
It doesn't need to defer anything to idle time; that achieves nothing anymore.
2024-02-23 13:43:45 -08:00
Daniel Johnson 51331e57ce This fanciness is not working; all kinds of racing going on.
Let's back off - just check all game directories when switching views.
2024-02-23 13:43:45 -08:00