From 8f459cd1af1d679efe0f25f2d27f6f4eef30ce04 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Wed, 11 Sep 2013 23:13:57 +0200 Subject: [PATCH] [iOS] Made the resources path the default working directory --- src/SFML/Window/iOS/SFAppDelegate.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SFML/Window/iOS/SFAppDelegate.mm b/src/SFML/Window/iOS/SFAppDelegate.mm index 3b0bdd82..e800b175 100644 --- a/src/SFML/Window/iOS/SFAppDelegate.mm +++ b/src/SFML/Window/iOS/SFAppDelegate.mm @@ -79,7 +79,10 @@ namespace // Register orientation changes notifications [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deviceOrientationDidChange:) name:UIDeviceOrientationDidChangeNotification object: nil]; - + + // Change the working directory to the resources directory + [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]]; + // Schedule an indirect call to the user main, so that this call (and the whole // init sequence) can end, and the default splashscreen can be destroyed [self performSelector:@selector(runUserMain) withObject:nil afterDelay:0.0];