mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-21 18:21:08 +00:00
Remove deprecated warnings on mac for cString use.
This commit is contained in:
parent
2e71b99ee0
commit
cc0f49f9a8
2 changed files with 4 additions and 4 deletions
|
@ -194,9 +194,9 @@ int SDL_main( int argc, char *argv[] ) {
|
|||
Sys_Error("Could not access application resources");
|
||||
|
||||
// DG: set exe_path so Posix_InitSignalHandlers() can call Posix_GetExePath()
|
||||
SDL_strlcpy(exe_path, [ [ [ NSBundle mainBundle ] bundlePath ] cString ], sizeof(exe_path));
|
||||
SDL_strlcpy(exe_path, [ [ [ NSBundle mainBundle ] bundlePath ] cStringUsingEncoding:NSUTF8StringEncoding ], sizeof(exe_path));
|
||||
// same for save_path for Posix_GetSavePath()
|
||||
D3_snprintfC99(save_path, sizeof(save_path), "%s/Library/Application Support/dhewm3", [NSHomeDirectory() cString]);
|
||||
D3_snprintfC99(save_path, sizeof(save_path), "%s/Library/Application Support/dhewm3", [NSHomeDirectory() cStringUsingEncoding:NSUTF8StringEncoding]);
|
||||
// and preinitializing basepath is easy enough so do that as well
|
||||
{
|
||||
char* snap;
|
||||
|
|
|
@ -50,7 +50,7 @@ void idSysLocal::OpenURL( const char *url, bool doexit ) {
|
|||
|
||||
|
||||
[[ NSWorkspace sharedWorkspace] openURL: [ NSURL URLWithString:
|
||||
[ NSString stringWithCString: url ] ] ];
|
||||
[ NSString stringWithCString: url encoding:NSUTF8StringEncoding ] ] ];
|
||||
|
||||
if ( doexit ) {
|
||||
quit_spamguard = true;
|
||||
|
@ -74,7 +74,7 @@ OSX_GetLocalizedString
|
|||
*/
|
||||
const char* OSX_GetLocalizedString( const char* key )
|
||||
{
|
||||
NSString *string = [ [ NSBundle mainBundle ] localizedStringForKey:[ NSString stringWithCString: key ]
|
||||
NSString *string = [ [ NSBundle mainBundle ] localizedStringForKey:[ NSString stringWithCString: key encoding:NSUTF8StringEncoding ]
|
||||
value:@"No translation" table:nil];
|
||||
return [string UTF8String];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue