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
This commit is contained in:
markgrebe 2005-05-28 01:29:29 +00:00
parent e5ea2f99be
commit 1fc5fa9ac2
2 changed files with 37 additions and 8 deletions

View File

@ -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 <unistd.h>
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 {

View File

@ -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;