-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix Everything is lost when the app is killed in background for android #14804
Open
gitgudyyao
wants to merge
10
commits into
libretro:master
Choose a base branch
from
gitgudyyao:androidsavestatefix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is an oft-requested feature that will be very much appreciated by users. :) It looks like our multi-platform compile checks failed due to the changes to location_driver.c. Perhaps you could wrap them in an 'android' ifdef? |
multi-platform compile checks failed due to the changes to location_driver.c. Perhaps you could wrap them in an 'android' ifdef?
LibretroAdmin
requested changes
Jan 5, 2023
m4xw
requested changes
Jan 20, 2023
@@ -92,7 +92,29 @@ void driver_location_set_interval(unsigned interval_msecs, | |||
* | |||
* Returns: true (1) if successful, otherwise false (0). | |||
**/ | |||
void driver_location_stop(void); | |||
void driver_location_stop(void) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a header.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Guidelines
Description
When RetroArch Android is closed by swiping up in Android task switcher, or automatically by the background task killer all progress in RetroArch is lost
Expected behavior
There should be an option (or always on) that flush in memory states to disk on activity onStop()
Flush SRAM to disk
If auto save state is on, make a save state
Flush auto save state to disk
Looking at uwp/uwp_main.cpp App::OnSuspending it seems like similar behavior was implemented for UWP, but not Android
Related Issues
Actual behavior
Everything is lost when the app is killed in background
Steps to reproduce the bug
Play a game in Retroarch
Switch to 5 other apps
Android should've killed Retroarch at this point
Go back to Retroarch. It appears as fresh instance without the game running and all progress are lost
Related Pull Requests
[Any other PRs from related repositories that might be needed for this pull request to work]
Reviewers
[If possible @mention all the people that should review your pull request]