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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string_ends_with(filename, "/.DS_Store"))
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,7 @@ UINavigationControllerDelegate> {
|
||||||
@property (nonatomic) UIWindow* window;
|
@property (nonatomic) UIWindow* window;
|
||||||
@property (nonatomic) NSString* documentsDirectory;
|
@property (nonatomic) NSString* documentsDirectory;
|
||||||
@property (nonatomic) int menu_count;
|
@property (nonatomic) int menu_count;
|
||||||
|
@property (nonatomic) NSDate *bgDate;
|
||||||
|
|
||||||
+ (RetroArch_iOS*)get;
|
+ (RetroArch_iOS*)get;
|
||||||
|
|
||||||
|
|
|
@ -559,6 +559,11 @@ enum
|
||||||
retroarch_main_quit();
|
retroarch_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)applicationWillResignActive:(UIApplication *)application
|
||||||
|
{
|
||||||
|
self.bgDate = [NSDate date];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||||
{
|
{
|
||||||
rarch_start_draw_observer();
|
rarch_start_draw_observer();
|
||||||
|
@ -573,6 +578,15 @@ enum
|
||||||
|
|
||||||
if (!ui_companion_start_on_boot)
|
if (!ui_companion_start_on_boot)
|
||||||
[self showGameView];
|
[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 {
|
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
|
||||||
|
|
Loading…
Reference in New Issue