After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770004 - Drop the runners when quitting a game
Drop the runners when quitting a game
Status: RESOLVED FIXED
Product: gnome-games
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-16 16:57 UTC by Adrien Plazas
Modified: 2016-08-17 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ui: Split ApplicationWindow.run_game_with_cancellable() (4.47 KB, patch)
2016-08-17 18:55 UTC, Adrien Plazas
committed Details | Review
ui: Don't store runners anymore in ApplicationWindow (2.45 KB, patch)
2016-08-17 18:55 UTC, Adrien Plazas
committed Details | Review
retro: Deinit RetroRunner when it is stopped (1.63 KB, patch)
2016-08-17 18:55 UTC, Adrien Plazas
committed Details | Review
core: Add Runner.stop () (1.57 KB, patch)
2016-08-17 18:55 UTC, Adrien Plazas
committed Details | Review
ui: Stop runners when quitting the game (872 bytes, patch)
2016-08-17 18:55 UTC, Adrien Plazas
committed Details | Review

Description Adrien Plazas 2016-08-16 16:57:25 UTC
When a game runner can save its state we can drop the runner safely and when a runner can't save the state we shouldn't keep the runner as its state when coming back is uncertain.

We should check how command based games work though.
Comment 1 Adrien Plazas 2016-08-17 18:55:21 UTC
Created attachment 333517 [details] [review]
ui: Split ApplicationWindow.run_game_with_cancellable()

This make it more readable and hence maintainable.
Comment 2 Adrien Plazas 2016-08-17 18:55:26 UTC
Created attachment 333518 [details] [review]
ui: Don't store runners anymore in ApplicationWindow

This avoids keeping unused runners, which is useless, make use of more
memory.
Comment 3 Adrien Plazas 2016-08-17 18:55:32 UTC
Created attachment 333519 [details] [review]
retro: Deinit RetroRunner when it is stopped

This will be used in the next commit to release memory when a game will
stop being used.
Comment 4 Adrien Plazas 2016-08-17 18:55:38 UTC
Created attachment 333520 [details] [review]
core: Add Runner.stop ()

Also implement it in the remaining runners.

This will be used in the next commit to explicitly stop a runner when
its game is quitted.
Comment 5 Adrien Plazas 2016-08-17 18:55:44 UTC
Created attachment 333521 [details] [review]
ui: Stop runners when quitting the game

This allows to release the Libretro cores when quitting a game.
Comment 6 Adrien Plazas 2016-08-17 18:56:26 UTC
Attachment 333517 [details] pushed as f60edd7 - ui: Split ApplicationWindow.run_game_with_cancellable()
Attachment 333518 [details] pushed as a0fdd3f - ui: Don't store runners anymore in ApplicationWindow
Attachment 333519 [details] pushed as 18b76ad - retro: Deinit RetroRunner when it is stopped
Attachment 333520 [details] pushed as 1871d6b - core: Add Runner.stop ()
Attachment 333521 [details] pushed as fa09f20 - ui: Stop runners when quitting the game