mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
+[OFString stringWithUTF8String:] -> @()
This commit is contained in:
parent
e67cc9f4d0
commit
70104f2d42
2 changed files with 5 additions and 5 deletions
|
@ -20,7 +20,7 @@ OFString* prefPath(const char* org, const char* app)
|
|||
if (!path)
|
||||
return [OFString string];
|
||||
|
||||
OFString* str = [OFString stringWithUTF8String:path];
|
||||
OFString* str = @(path);
|
||||
SDL_free(path);
|
||||
return str;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ void Config::read(int argc, char *argv[])
|
|||
|
||||
if (argc > 1)
|
||||
{
|
||||
OFString* argv1 = [OFString stringWithUTF8String:argv[1]];
|
||||
OFString* argv1 = @(argv[1]);
|
||||
if ([argv1 isEqual: @"debug"] || [argv1 isEqual: @"test"])
|
||||
editor.debug = true;
|
||||
else if ([argv1 isEqual: @"btest"])
|
||||
|
@ -199,7 +199,7 @@ void Config::readGameINI()
|
|||
if (!customScript.empty())
|
||||
{
|
||||
|
||||
game.title = [[[[OFString stringWithUTF8String:customScript.c_str()] pathComponents] componentsJoinedByString:@"/"] UTF8String];
|
||||
game.title = customScript.c_str();
|
||||
|
||||
if (rgssVersion == 0)
|
||||
rgssVersion = 1;
|
||||
|
|
|
@ -221,7 +221,7 @@ int main(int argc, char *argv[])
|
|||
SDL_free(tmp);
|
||||
}
|
||||
}
|
||||
@try{[fm changeCurrentDirectoryPath:[OFString stringWithUTF8String:dataDir]];}@catch(...){}
|
||||
@try{[fm changeCurrentDirectoryPath:@(dataDir)];}@catch(...){}
|
||||
#endif
|
||||
|
||||
/* now we load the config */
|
||||
|
@ -231,7 +231,7 @@ int main(int argc, char *argv[])
|
|||
if (!conf.gameFolder.empty())
|
||||
{
|
||||
@try{
|
||||
[fm changeCurrentDirectoryPath:[OFString stringWithUTF8String:conf.gameFolder.c_str()]];
|
||||
[fm changeCurrentDirectoryPath:@(conf.gameFolder.c_str())];
|
||||
}
|
||||
@catch(...){
|
||||
showInitError(std::string("Unable to switch into gameFolder ") + conf.gameFolder);
|
||||
|
|
Loading…
Add table
Reference in a new issue