Commit graph

9933 commits

Author SHA1 Message Date
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
Mathieu Comandon 0c5180717f This is the log until this is resolved 2024-02-23 13:43:45 -08:00
Daniel Johnson 1e532b0405 Tone down the logging for missing games; don't bother to log when one game is being checked.
This happens a lot if you are selecting games one after the other (ie, via arrow keys) and it spams the log.
2024-02-23 13:43:45 -08:00
Daniel Johnson 69dea32f57 Rework 'missing' badge lookup so that resolves to the PGA game ID and path.
This way missing badges can appear on media for installed games even in the service views. We are doing this resolution only for visible games, so we should not hit the PGA database too much, I hope.

This moves some common code up to the GameView base class.
2024-02-23 13:43:45 -08:00
Daniel Johnson 7cbb33fe34 Recheck the missing status of each game that you select, though still on the worker thread.
This way you don't actually need to restart Lutris to get the missing status up to date, if you know hte obscure trick.

 But you have to do something, it's not just updating all the time.
2024-02-23 13:43:45 -08:00
Daniel Johnson d11b107c41 Walk back the automatic recheck logic in the cell-renderer.
It will now update missing status at startup, and if it needs to draw the badge for a previously unknown game.
2024-02-23 13:43:45 -08:00
Mathieu Comandon 3fef435cd5 Add i915 driver 2024-02-23 13:43:45 -08:00
Mathieu Comandon 2538e9398d Avoid access to present_menu before it's initialized 2024-02-23 13:43:45 -08:00
Mathieu Comandon ee88f1231c Map llvmpipe loader to virtio-pci driver 2024-02-23 13:43:45 -08:00
Mathieu Comandon fb8daf0ea6 Only show PCI ID if present 2024-02-23 13:43:45 -08:00
Mathieu Comandon 2ff6404588 Fix call of lspci 2024-02-23 13:43:45 -08:00
Mathieu Comandon fcaf28dc88 Add default value when lspci fails 2024-02-23 13:43:45 -08:00
Mathieu Comandon fa9ea2f4ee Also add V3D 2024-02-23 13:43:45 -08:00
Mathieu Comandon 84f221c17d Add loader mapping for Raspberry Pi 5 2024-02-23 13:43:45 -08:00
Mathieu Comandon c6a4b4739f Add PCI slot name to default value 2024-02-23 13:43:45 -08:00
Daniel Johnson 889f3d5f95 Convert the Lutris Playtime timer to user time.monotonic()
It was using datetime.now() which uses time-zones, and will produce bogus results in the presence of daylight saving time changes or system clock updates.

time.monotonic() is The Right Thing here, since we are just measuring the passage of time, not any notion of absolute time.

It even comes in seconds out of the box, like we want.
2024-02-23 13:43:45 -08:00
Mathieu Comandon e2fe84c544 Reorder display options and simplify driver version logging 2024-02-23 13:43:45 -08:00
Mathieu Comandon 8dd737af39 Better multi-GPU support Closes #5291) 2024-02-23 13:43:45 -08:00
Daniel Johnson f2e1c3abc7 When rewriting a json file, we need to truncate it, so it can be shorter not just longer.
Resolves #5292
2024-02-23 13:43:45 -08:00