mirror of
https://github.com/libretro/RetroArch
synced 2025-03-17 10:21:26 +00:00
Cloud sync fixes - ignore .DS_Store files and re-sync on app foreground (#16055)
This commit is contained in:
parent
3ce56c5b42
commit
99309a4d79
@ -255,6 +255,9 @@ static bool task_cloud_sync_should_ignore_file(const char *filename)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (string_ends_with(filename, "/.DS_Store"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ UINavigationControllerDelegate> {
|
||||
@property (nonatomic) UIWindow* window;
|
||||
@property (nonatomic) NSString* documentsDirectory;
|
||||
@property (nonatomic) int menu_count;
|
||||
@property (nonatomic) NSDate *bgDate;
|
||||
|
||||
+ (RetroArch_iOS*)get;
|
||||
|
||||
|
@ -559,6 +559,11 @@ enum
|
||||
retroarch_main_quit();
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
{
|
||||
self.bgDate = [NSDate date];
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||
{
|
||||
rarch_start_draw_observer();
|
||||
@ -573,6 +578,15 @@ enum
|
||||
|
||||
if (!ui_companion_start_on_boot)
|
||||
[self showGameView];
|
||||
|
||||
if (self.bgDate)
|
||||
{
|
||||
if ( [[NSDate date] timeIntervalSinceDate:self.bgDate] > 60.0f
|
||||
&& ( !(runloop_get_flags() & RUNLOOP_FLAG_CORE_RUNNING)
|
||||
|| retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)))
|
||||
task_push_cloud_sync();
|
||||
self.bgDate = nil;
|
||||
}
|
||||
}
|
||||
|
||||
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
|
||||
|
Loading…
x
Reference in New Issue
Block a user