-
-
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
base: master
Are you sure you want to change the base?
Conversation
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?
@@ -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.
@@ -116,6 +116,8 @@ void driver_location_stop(void) | |||
location_st->driver->stop(location_st->data); | |||
} | |||
|
|||
|
|||
|
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.
redundant newlines
androidlocation_t *androidlocation = (androidlocation_t*)data; | ||
JNIEnv *env = jni_thread_getenv(); | ||
if (!env) | ||
androidlocation_t *androidlocation = (androidlocation_t*)data; |
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.
wrong indentation
Was this merged? |
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]