diff --git a/src/macosx/Info-StellaOSX.plist b/src/macosx/Info-StellaOSX.plist index 040a5b1e0..53ddd2b9d 100644 --- a/src/macosx/Info-StellaOSX.plist +++ b/src/macosx/Info-StellaOSX.plist @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion @@ -55,7 +55,7 @@ NSMainNibFile SDLMain.nib NSPrincipalClass - SDLApplication + NSApplication «PROJECTNAMEASXML» SDL Cocoa App diff --git a/src/macosx/SDLMain.m b/src/macosx/SDLMain.m index 8a14dc7d2..88b9f7968 100755 --- a/src/macosx/SDLMain.m +++ b/src/macosx/SDLMain.m @@ -48,8 +48,6 @@ static int gArgc; static char **gArgv; static BOOL gFinderLaunch; static BOOL gCalledAppMainline = FALSE; -//static BOOL started=NO; -//static char startupFile[FILENAME_MAX]; int fileToLoad = FALSE; char parentdir[MAXPATHLEN]; @@ -72,20 +70,6 @@ static NSString *getApplicationName(void) } -#if 0 -// -------------------------------------------------------------------------------- -/* Routine to center the application window */ -void centerAppWindow(void) -{ - [[[SDLApplication sharedApplication] keyWindow] center]; -} - - -/////// FIXME ////////////////////////////// - -char *appName = "StellaOSX"; -#endif - #if SDL_USE_NIB_FILE // -------------------------------------------------------------------------------- /* A helper category for NSString */ @@ -328,25 +312,7 @@ static void CustomApplicationMain (int argc, char **argv) gArgv[gArgc] = NULL; return TRUE; } -/* OLD VERSION -- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename -{ - if (started) - { - char cFilename[FILENAME_MAX]; - strncpy(cFilename, [filename cStringUsingEncoding: NSASCIIStringEncoding], FILENAME_MAX-1); - if (strlen(cFilename) > 0) - macOpenConsole(cFilename); - } - else - { - fileToLoad = TRUE; - strncpy(startupFile, [filename cStringUsingEncoding: NSASCIIStringEncoding], FILENAME_MAX-1); - } - - return(FALSE); -} -*/ + // -------------------------------------------------------------------------------- /* Called when the internal event loop has just started running */ @@ -369,33 +335,7 @@ static void CustomApplicationMain (int argc, char **argv) /* We're done, thank you for playing */ exit(status); } -/* OLD VERSION -- (void) applicationDidFinishLaunching: (NSNotification *) note -{ - int status; - char *args[2]; - - started = YES; - - // Set the main menu to contain the real app name instead of "SDL App" - [self fixMenu:[NSApp mainMenu] withAppName:[[NSProcessInfo processInfo] processName]]; - // Hand off to main application code - args[0] = appName; - if (fileToLoad) - { - args[1] = startupFile; - status = stellaMain(2,args); - } - else - { - status = stellaMain(1,args); - } - - // We're done, thank you for playing - exit(status); -} -*/ @end @@ -439,6 +379,13 @@ static void CustomApplicationMain (int argc, char **argv) @end +// -------------------------------------------------------------------------------- +/* Routine to center the application window */ +void centerAppWindow(void) +{ + [[[NSApplication sharedApplication] keyWindow] center]; +} + #ifdef main # undef main diff --git a/src/macosx/stella.xcodeproj/project.pbxproj b/src/macosx/stella.xcodeproj/project.pbxproj index 456a2caba..f42461991 100644 --- a/src/macosx/stella.xcodeproj/project.pbxproj +++ b/src/macosx/stella.xcodeproj/project.pbxproj @@ -268,7 +268,6 @@ DC173F770E2CAC1E00320F94 /* ContextMenu.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC173F750E2CAC1E00320F94 /* ContextMenu.hxx */; }; DC1FC18A0DB3B2C7009B3DF7 /* SerialPortMACOSX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC1FC1880DB3B2C7009B3DF7 /* SerialPortMACOSX.cxx */; }; DC1FC18B0DB3B2C7009B3DF7 /* SerialPortMACOSX.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC1FC1890DB3B2C7009B3DF7 /* SerialPortMACOSX.hxx */; }; - DC419D82108E10A3006E8687 /* Info-StellaOSX.plist in Resources */ = {isa = PBXBuildFile; fileRef = DC419D81108E10A3006E8687 /* Info-StellaOSX.plist */; }; DC4613670D92C03600D8DAB9 /* RomAuditDialog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC4613650D92C03600D8DAB9 /* RomAuditDialog.cxx */; }; DC4613680D92C03600D8DAB9 /* RomAuditDialog.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC4613660D92C03600D8DAB9 /* RomAuditDialog.hxx */; }; DC47455509C34BFA00EDDA3A /* BankRomCheat.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC47454A09C34BFA00EDDA3A /* BankRomCheat.cxx */; }; @@ -776,12 +775,12 @@ 29B97314FDCFA39411CA2CEA /* «PROJECTNAMEASXML» */ = { isa = PBXGroup; children = ( + DC419D81108E10A3006E8687 /* Info-StellaOSX.plist */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, - DC419D81108E10A3006E8687 /* Info-StellaOSX.plist */, ); name = "«PROJECTNAMEASXML»"; sourceTree = ""; @@ -1435,7 +1434,6 @@ 2D91747109BA90380026E9FF /* ../../docs in Resources */, 2D91747209BA90380026E9FF /* AboutBox.nib in Resources */, 2DEFB40C09C3386F00754289 /* Cart.icns in Resources */, - DC419D82108E10A3006E8687 /* Info-StellaOSX.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1677,7 +1675,7 @@ ../gui, ., ); - INFOPLIST_FILE = "Info-StellaOSX__Upgraded_.plist"; + INFOPLIST_FILE = "Info-StellaOSX.plist"; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = "$(LIBRARY_SEARCH_PATHS)"; OTHER_CFLAGS = ""; @@ -1734,7 +1732,7 @@ ../gui, ., ); - INFOPLIST_FILE = "Info-StellaOSX__Upgraded_.plist"; + INFOPLIST_FILE = "Info-StellaOSX.plist"; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = "$(LIBRARY_SEARCH_PATHS)"; OTHER_CFLAGS = ""; @@ -1790,7 +1788,7 @@ ../gui, ., ); - INFOPLIST_FILE = "Info-StellaOSX__Upgraded_.plist"; + INFOPLIST_FILE = "Info-StellaOSX.plist"; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = .; OTHER_CFLAGS = "";