From 1fc5fa9ac23f0d0e7522d888e52d785c731524ca Mon Sep 17 00:00:00 2001 From: markgrebe Date: Sat, 28 May 2005 01:29:29 +0000 Subject: [PATCH] Added ability for user to open ROM by dropping it on running application's Icon in dock. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@447 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/macosx/SDLMain.m | 11 ++---- .../src/macosx/stella.pbproj/project.pbxproj | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/stella/src/macosx/SDLMain.m b/stella/src/macosx/SDLMain.m index e23db1e8b..58f1acb29 100755 --- a/stella/src/macosx/SDLMain.m +++ b/stella/src/macosx/SDLMain.m @@ -4,8 +4,7 @@ Feel free to customize this file to suit your needs */ -/* $Id: SDLMain.m,v 1.2 2005-05-27 17:13:23 markgrebe Exp $ */ -// TBD - Fix ICON drop to dock after running. +/* $Id: SDLMain.m,v 1.3 2005-05-28 01:29:29 markgrebe Exp $ */ #import "SDL.h" #import "SDLMain.h" @@ -14,6 +13,7 @@ #import extern int stellaMain(int argc, char* argv[]); +void macOpenConsole(char *romname); static int gArgc; static char **gArgv; @@ -136,7 +136,6 @@ char fileName[FILENAME_MAX]; *-----------------------------------------------------------------------------*/ - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename { - SDL_Event event; char *cFilename; if (started) { @@ -144,11 +143,7 @@ char fileName[FILENAME_MAX]; if (cFilename) { [filename getCString:cFilename]; - event.type = SDL_USEREVENT; - event.user.code = 1; - event.user.data1 = cFilename; - event.user.data2 = 0; - SDL_PushEvent(&event); + macOpenConsole(cFilename); } } else { diff --git a/stella/src/macosx/stella.pbproj/project.pbxproj b/stella/src/macosx/stella.pbproj/project.pbxproj index 46445aa4a..c4c39c607 100755 --- a/stella/src/macosx/stella.pbproj/project.pbxproj +++ b/stella/src/macosx/stella.pbproj/project.pbxproj @@ -294,6 +294,8 @@ 2DDBEAAC084578BF00812C11, 2DDBEAAD084578BF00812C11, 2DDBEAAE084578BF00812C11, + 2DDFFA280847EF4E00201CC8, + 2DDFFA290847EF4E00201CC8, 2DDBEAAF084578BF00812C11, 2DDBEAB0084578BF00812C11, 2DDBEAB1084578BF00812C11, @@ -560,6 +562,7 @@ 2DDBEB7D08457B7D00812C11, 2DDBEB7F08457B7D00812C11, 2DDBEBE5084582C400812C11, + 2DDFFA2B0847EF4E00201CC8, ); isa = PBXHeadersBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -663,6 +666,7 @@ 2DDBEB7C08457B7D00812C11, 2DDBEB7E08457B7D00812C11, 2DDBEBE6084582C400812C11, + 2DDFFA2A0847EF4E00201CC8, ); isa = PBXSourcesBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -1991,6 +1995,36 @@ settings = { }; }; + 2DDFFA280847EF4E00201CC8 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Debugger.cxx; + path = ../gui/Debugger.cxx; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + 2DDFFA290847EF4E00201CC8 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + name = Debugger.hxx; + path = ../gui/Debugger.hxx; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + 2DDFFA2A0847EF4E00201CC8 = { + fileRef = 2DDFFA280847EF4E00201CC8; + isa = PBXBuildFile; + settings = { + }; + }; + 2DDFFA2B0847EF4E00201CC8 = { + fileRef = 2DDFFA290847EF4E00201CC8; + isa = PBXBuildFile; + settings = { + }; + }; 2DE2DF100627AE07006BEC99 = { fileEncoding = 30; isa = PBXFileReference;