Commit graph

9901 commits

Author SHA1 Message Date
farchord 4569a6614f One more update to metainfo
Forgot a section.
2024-02-23 13:43:44 -08:00
farchord c38778fc9e Fix metainfo.xml
There was a syntax error in the metainfo.xml file. Fixed!
2024-02-23 13:43:44 -08:00
Mathieu Comandon d6f970e23d Update to 0.5.16 2024-02-23 13:43:44 -08:00
Daniel Johnson 0f8c4cc0d5 Un-indent the file list commit code so it runs even if ther's no service and no installer-id.
Resolves #5238
2024-02-23 13:43:44 -08:00
Daniel Johnson d2e5625894 Raise the 'many games' limit to 512; without a debugger attached, the GameStore build code is quite a bit faster.
But it is still several times slower than fetching the games.

It's all still async regardless; this is just about when to show the spinner.
2024-02-23 13:43:44 -08:00
Daniel Johnson a97e042424 Defer the spinner until we have the filtered game list- then we know how big the game store will be.
We can then show the spinner only if there are 'many' games- I find the GameStore construction is by far the slower part of this, so we can avoid UI flicker this way.

The GameStore is built on a thread regardless, to minimize the chance of the infamous Death Waggle bug. It just looks smoother not to flash the spinner.
2024-02-23 13:43:44 -08:00
Daniel Johnson b3e9273457 Display a spinner in the LutrisWindow while fetching games and building the GameStore. 2024-02-23 13:43:44 -08:00
Daniel Johnson 4dd776e3df Generate the GameStore on a thread; it's surprising how noticeable this is. 2024-02-23 13:43:44 -08:00
Daniel Johnson 0b59ba5868 Tolerate missing run-in-background key.
Resolves #5233
2024-02-23 13:43:44 -08:00
Daniel Johnson 7f339d5526 The account box should cope if a steam account somehow has no personal name.
We could probably do better than the ID here, but I don't know what we can use. The ID is better than crashing at least.
2024-02-23 13:43:44 -08:00
Daniel Johnson b00988a8bf Also use that new method to install dependency games. 2024-02-23 13:43:44 -08:00
Daniel Johnson 1b0654507d Also installed Lutris games via the AddGamesWindow via the new method
So this will also use AsyncCall to fetch the installers.
2024-02-23 13:43:44 -08:00
Daniel Johnson d8300a7ed0 Convert service client updaters to use AsyncCall.
I've had them all call a common method on the application, and it fetches the installers on a thread.
2024-02-23 13:43:44 -08:00
Daniel Johnson 93f494ad24 The Lutris service can get its game installers on a thread too! 2024-02-23 13:43:44 -08:00
Daniel Johnson 298498c2aa Move calls to obtain installers from the service onto AsyncCall. 2024-02-23 13:43:44 -08:00
Daniel Johnson 0a913b4ae2 Use AsyncCall to obtain updates and DLC.
Round-tripping to the GOG servers can take a little while.
2024-02-23 13:43:44 -08:00
Daniel Johnson bb1d2cbf42 Check for the appid before loading extras.
You can have a GOG game off the Lutris website that does not download from GOG - you provide the installer file. "Alient Shooter" is one of these.

In this case, we have no appid and can get no extras, and we should not try to get them.
2024-02-23 13:43:44 -08:00
Daniel Johnson cea26bf283 Work around the 'double files' bug.
If you click Continue fas enough, you can trigger the prepare_game_files() method to run twice, on two threads concurrently. This results in doubled up files and a duplicate files page in the navigation stack.

This is hard to fix simply or without UI ugliness, so this commit tolerates it.

It adjusts prepare_game_files() to be thread-safer (!) by committing its changes only at the end. The GIL should make this atomic, probably, so the last preparation wins instead of being combined with the other.

The navigation stack will now refuse to add a duplicate page; it still exits the old and re-enters but does not put the second entry in the history, so you'll go back further when you click the Back button.

That should hide the problem with minimal code churn and risk.
2024-02-23 13:43:44 -08:00
Daniel Johnson dcdf9f230c Even uglier unsafe signal fix
I'm not really sure that this code actually runs - there's dead code here for sure, and I can't prove we can ever match an existing game with an api-provided service installer.

Buuut if it does run it can crash us. We can't emi 'game-updated' on a thread, it absolutely hits GTK.

This commit moves the signal to the main thread and adds some error handling to avoid a NoneType error here too.

Super ugly this. Asyncio could do some much better!
2024-02-23 13:43:44 -08:00
Daniel Johnson 4e310a6444 Fix move-game crash
Now here's a place where asyncio would clearly have helped.

But, the problem is that the move-game logic runs on a thread and changes the game. It saves the game and *that* fires the 'game-updated' signal. Various bits of the UI handle this to update the UI.

But GTK is not thread-safe at all, and updating the UI from a thread will sometimes crash it.

This commit suppresses the signal, and then manually fires it after the moe completes on the main thread in the AsyncCall callback.
2024-02-23 13:43:44 -08:00
Daniel Johnson ad2179b609 More extensive commenting for GameActions 2024-02-23 13:39:35 -08:00
Daniel Johnson d2c7e8706c Remove the games list from all GameActions but MultiGameActions; SingleGameActions.game can just be an ordinary field. 2024-02-23 13:39:35 -08:00
Daniel Johnson d388c82c59 Remove all the game loops from SingleGameAction, using a property for now 2024-02-23 13:39:35 -08:00
Daniel Johnson 49779fbab5 Merge BaseGameActions and GameActions. 2024-02-23 13:39:35 -08:00
Daniel Johnson 41a2f227a4 Split GameActions into separate subclasses for the single and multi game cases, moving single-game-only methods down into it. 2024-02-23 13:39:35 -08:00
Daniel Johnson 63c3e34d5c Add explanatory comments about destroying the VKInstance. 2024-02-22 19:34:03 -05:00
Daniel Johnson 8f4b9a8f25 Merge branch 'dj/never_destroy_vkinstance' 2024-02-22 19:19:30 -05:00
Daniel Johnson 840b51a188 Block the game actions for multi-selections that contain service games.
These offer a non-functional 'Add to favorites' command. There are no actions that work on multiple service games, or mixes of service and library games.
2024-02-22 19:13:09 -05:00
Daniel Johnson 1efe4245ae Never destroy a VKInstance; just allocate on demand and keep it while Lutris runs.
For some reason, destroy the VKInstance cause some users to crash. I can't see why. But how about we don't do that?

Resolve #5222
2024-02-22 14:17:26 -05:00
Mathieu Comandon 3a5236f044 Increment version to get ULWGL in the Runtime API 2024-02-21 18:43:40 -08:00
Mathieu Comandon c98a63dd5a Seems like this should use launch_config_name like the other methods 2024-02-21 18:41:32 -08:00
Daniel Johnson d4897bc9e0 Treat a missing or None category as "all", so Runner and Platform views work again. 2024-02-21 16:10:14 -05:00
Mathieu Comandon c0231ff756 Remove Lutris service from defaults and hide it behind an environment variable 2024-02-21 01:25:07 -08:00
Mathieu Comandon b44f633bb5 Sync library on launch and game install 2024-02-21 01:07:19 -08:00
Mathieu Comandon 84dfd9514f Run initial sync when first enabled 2024-02-21 00:56:42 -08:00
Mathieu Comandon 85bfd70a99 Add login/logout button to account section 2024-02-20 17:27:01 -08:00
Daniel Johnson a353570c0a Provide message for the hidden row when it is empty, but also disable 'Show Hidden Games' when there are no hidden games. 2024-02-20 14:20:25 -08:00
Daniel Johnson 9d3d9bbcf3 Hide the hidden row when it is not selected, that is, when you switch away from it. 2024-02-20 14:20:25 -08:00
Daniel Johnson e6e4e37c8f Avoid selected hidden rows when starting up.
This means you won't return to the hidden row *or* the running row; instead you will go to the 'Games' view on start-up.
2024-02-20 14:20:25 -08:00
Daniel Johnson 83101404be Fix bugs in the filtering so hidden games are hidden, except in the hidden view, and update as soon as you hide them or unhide them. 2024-02-20 14:20:25 -08:00
Daniel Johnson 990b54af22 Adjust hidden and favorites code for consistency, also add some commenting. 2024-02-20 14:20:25 -08:00
Daniel Johnson eecbc50627 Remove old 'hidden' column from schema, add migration to category
This only works because we don't remove the column from existing databases, but we won't create it in new ones.

There's a bit of error handling so we silently skip the migration if the column's not there.

Also fix broken migration code, so migrations are applied with no init dialog.
2024-02-20 14:20:25 -08:00
Daniel Johnson 01a32a9676 Make the 'Hidden' sidebar row itself hidden initially; convert the Show Hidden Games from a toggle to a command.
It shows the hidden sidebar row and selects it.
2024-02-20 14:20:25 -08:00
Daniel Johnson f822396707 Make a '.hidden' category and convert Lutris 'hidden' flag to work with it, like with favorites. 2024-02-20 14:20:25 -08:00
Daniel Johnson 32ec711160 Fix rebase whoopsie! I did that that import. 2024-02-20 11:05:21 -08:00
Daniel Johnson de84258817 Check for whether we got an image file extensions; if not we'll have to transcode and hope. 2024-02-20 11:05:21 -08:00
Daniel Johnson 819df3b4a8 Correct rebase whoopsie! 2024-02-20 11:05:21 -08:00
Daniel Johnson 9328cce216 Convert the pick-a-custom image to using the trash too, which involves a lot of callback spaghetti.
However, it also avoids a usage of GTK on a worker thread, which was a bug.
2024-02-20 11:05:21 -08:00
Daniel Johnson aa39e5d98d Trash the media files on refresh, don't just delete them. 2024-02-20 11:05:21 -08:00
Daniel Johnson d84fbbf604 Handle possible-path resolution separately at each call site
This means we now delete all media when you click the refresh button.
2024-02-20 11:05:21 -08:00