Skip to content

Commit e9a6882

Browse files
committed
Fix data path discovery in iOS
1 parent 8510ebf commit e9a6882

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/io/file_manager.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,22 @@ bool macSetBundlePathIfRelevant(std::string& data_dir)
9494
CFRelease(main_bundle_URL);
9595
CFRelease(cf_string_ref);
9696

97-
std::string contents = std::string(path) + std::string("/Contents");
97+
// IOS version of stk store data folder directly inside supertuxkart.app
98+
std::string contents = std::string(path) + "/";
99+
#ifndef IOS_STK
100+
contents += std::string("Contents");
101+
#endif
98102
if(contents.find(".app") != std::string::npos)
99103
{
104+
#ifdef IOS_STK
105+
data_dir = contents;
106+
return true;
107+
#else
100108
Log::debug("[FileManager]", "yes");
101109
// executable is inside an app bundle, use app bundle-relative paths
102110
data_dir = contents + std::string("/Resources/");
103111
return true;
112+
#endif
104113
}
105114
else
106115
{

0 commit comments

Comments
 (0)