mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-16 13:05:36 +00:00
LaunchAPPLServer: fix for PPC
This commit is contained in:
parent
3c071a0772
commit
c29a932f4d
@ -4,6 +4,7 @@ SEGMENT Serial
|
||||
|
||||
SEGMENT Launcher
|
||||
*/AppLauncher.*
|
||||
*/ToolLauncher.*
|
||||
|
||||
SEGMENT libstdc++
|
||||
*/libstdc++.a:*
|
||||
|
@ -9,15 +9,6 @@ class ToolLauncher : public AppLauncher
|
||||
bool replyReceived;
|
||||
AEEventHandlerUPP replyHandler = nullptr;
|
||||
|
||||
static pascal OSErr handleReply(const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
|
||||
{
|
||||
ToolLauncher *self = (ToolLauncher*)handlerRefcon;
|
||||
self->replyReceived = true;
|
||||
|
||||
AERemoveEventHandler(kCoreEventClass, kAEAnswer, handleReply, false);
|
||||
return noErr;
|
||||
}
|
||||
|
||||
Handle buildCommandLine(ConstStr255Param name)
|
||||
{
|
||||
CInfoPBRec pb;
|
||||
@ -70,12 +61,21 @@ class ToolLauncher : public AppLauncher
|
||||
return text;
|
||||
}
|
||||
|
||||
static pascal OSErr handleReply(const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
|
||||
{
|
||||
ToolLauncher *self = (ToolLauncher*)handlerRefcon;
|
||||
self->replyReceived = true;
|
||||
|
||||
AERemoveEventHandler(kCoreEventClass, kAEAnswer, self->replyHandler, false);
|
||||
return noErr;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual bool Launch(ConstStr255Param name)
|
||||
{
|
||||
if(!replyHandler)
|
||||
replyHandler = NewAEEventHandlerUPP(&handleReply);
|
||||
AEInstallEventHandler(kCoreEventClass, kAEAnswer, handleReply, (long)this, false);
|
||||
AEInstallEventHandler(kCoreEventClass, kAEAnswer, replyHandler, (long)this, false);
|
||||
|
||||
AEAddressDesc address;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user