示例#1
0
static pascal OSErr AErapp(const AppleEvent *theEvent, AppleEvent *theReply, long refCon)
{
	#pragma unused (theEvent, theReply, refCon)
	
	if (running)
		return noErr;

	if (!cartOpen)
	{
		if (startopendlog)
		{
			if (SNES9X_OpenCart(nil))
			{
				SNES9X_Go();
				QuitApplicationEventLoop();
			}
		}
	}
	else
	{
		SNES9X_Go();
		QuitApplicationEventLoop();
	}
	
	return noErr;
}
示例#2
0
static pascal OSErr AErapp (const AppleEvent *theEvent, AppleEvent *theReply, long refCon)
{
	if (running)
		return (noErr);

	if (!cartOpen)
	{
		if (startopendlog)
		{
			if (SNES9X_OpenCart(NULL))
			{
				SNES9X_Go();
				QuitApplicationEventLoop();
			}
			else
				AdjustMenus();
		}
	}
	else
	{
		SNES9X_Go();
		QuitApplicationEventLoop();
	}

	return (noErr);
}
示例#3
0
static pascal OSErr AEodoc(const AppleEvent *theEvent, AppleEvent *theReply, long refCon)
{
	OSErr 		err;
	FSRef		ref;
	AEDescList	docList;
	AEKeyword	keywd;
	DescType	rtype;
	Size		acsize;
	long		count;
	
	#pragma unused (theReply, refCon)
	
	if (running)
		return noErr;

	err = AEGetParamDesc(theEvent, keyDirectObject, typeAEList, &docList);
	if (err)
		return noErr;
	
	err = AECountItems(&docList, &count);
	if (err || (count != 1))
	{
		err = AEDisposeDesc(&docList);
		return noErr;
	}
	
	err = AEGetNthPtr(&docList, 1, typeFSRef, &keywd, &rtype, &ref, sizeof(FSRef), &acsize);
	if (err == noErr)
	{
		if (SNES9X_OpenCart(&ref))
		{
			SNES9X_Go();
			QuitApplicationEventLoop();
		}
	}

	err = AEDisposeDesc(&docList);

	return noErr;
}