|
|
| version 1.33, 2003/11/08 17:54:26 | version 1.34, 2003/11/11 16:33:50 |
|---|---|
| Line 38 | Line 38 |
| #include "macalert.h" | #include "macalert.h" |
| #include "np2opening.h" | #include "np2opening.h" |
| #include "toolwin.h" | #include "toolwin.h" |
| #include "aboutdlg.h" | |
| #include <QuickTime/QuickTime.h> | #include <QuickTime/QuickTime.h> |
| #define USE_RESUME | #define USE_RESUME |
| Line 138 static void MenuBarInit(void) { | Line 139 static void MenuBarInit(void) { |
| InsertMenu(GetMenu(IDM_SOUND), -1); | InsertMenu(GetMenu(IDM_SOUND), -1); |
| InsertMenu(GetMenu(IDM_MEMORY), -1); | InsertMenu(GetMenu(IDM_MEMORY), -1); |
| ChangeMenuAttributes(GetMenuRef(IDM_EDIT), kMenuAttrAutoDisable, 0); | ChangeMenuAttributes(GetMenuRef(IDM_EDIT), kMenuAttrAutoDisable, 0); |
| DisableAllMenuItems(GetMenuHandle(IDM_EDIT)); | |
| SetMenuItemModifiers(GetMenuRef(IDM_FDD2), IDM_FDD2OPEN, kMenuOptionModifier); | SetMenuItemModifiers(GetMenuRef(IDM_FDD2), IDM_FDD2OPEN, kMenuOptionModifier); |
| SetMenuItemModifiers(GetMenuRef(IDM_FDD2), IDM_FDD2EJECT, kMenuOptionModifier); | SetMenuItemModifiers(GetMenuRef(IDM_FDD2), IDM_FDD2EJECT, kMenuOptionModifier); |
| SetMenuItemModifiers(GetMenuRef(IDM_SASI2), IDM_SASI2OPEN, kMenuOptionModifier); | SetMenuItemModifiers(GetMenuRef(IDM_SASI2), IDM_SASI2OPEN, kMenuOptionModifier); |
| Line 530 static void HandleMenuChoice(long wParam | Line 532 static void HandleMenuChoice(long wParam |
| menu_setmsrapid(np2cfg.MOUSERAPID ^ 1); | menu_setmsrapid(np2cfg.MOUSERAPID ^ 1); |
| update |= SYS_UPDATECFG; | update |= SYS_UPDATECFG; |
| break; | break; |
| case IDM_RECORDING: | |
| menu_setrecording(false); | |
| break; | |
| case IDM_I286SAVE: | case IDM_I286SAVE: |
| debugsub_status(); | debugsub_status(); |
| break; | break; |
| case IDM_RECORDING: | case IDM_NP2HELP: |
| menu_setrecording(false); | { |
| ICInstance inst; | |
| long start, fin; | |
| const char urlStr[] = "http://retropc.net/tk800/np2x/help.html"; | |
| ICStart(&inst, 'SMil'); | |
| start = 0; | |
| fin = strlen(urlStr); | |
| ICLaunchURL(inst, "\p", urlStr, strlen(urlStr), &start, &fin); | |
| ICStop(inst); | |
| } | |
| break; | break; |
| default: | default: |
| Line 674 int main(int argc, char *argv[]) { | Line 690 int main(int argc, char *argv[]) { |
| menu_setdispclk(np2oscfg.DISPCLK); | menu_setdispclk(np2oscfg.DISPCLK); |
| menu_setbtnrapid(np2cfg.BTN_RAPID); | menu_setbtnrapid(np2cfg.BTN_RAPID); |
| menu_setbtnmode(np2cfg.BTN_MODE); | menu_setbtnmode(np2cfg.BTN_MODE); |
| if (np2oscfg.I286SAVE) { | |
| AppendMenuItemTextWithCFString(GetMenuRef(IDM_OTHER), CFCopyLocalizedString(CFSTR("i286 save"),"i286"), kMenuItemAttrIconDisabled, NULL,NULL); | |
| } | |
| scrnmode = 0; | scrnmode = 0; |
| if (scrnmng_create(scrnmode) != SUCCESS) { | if (scrnmng_create(scrnmode) != SUCCESS) { |
| Line 711 int main(int argc, char *argv[]) { | Line 730 int main(int argc, char *argv[]) { |
| flagload(np2resume); | flagload(np2resume); |
| } | } |
| #endif | #endif |
| if (np2oscfg.toolwin) { | |
| toolwin_open(); | |
| } | |
| theTarget = GetEventDispatcherTarget(); | theTarget = GetEventDispatcherTarget(); |
| Line 851 static pascal OSStatus np2appevent (Even | Line 873 static pascal OSStatus np2appevent (Even |
| switch (eventClass) | switch (eventClass) |
| { | { |
| case kEventClassCommand: | |
| if (GetEventKind(event)==kEventCommandProcess) { | |
| HICommand cmd; | |
| GetEventParameter(event, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &cmd); | |
| if (cmd.commandID == kHICommandAppHelp) { | |
| ICInstance inst; | |
| long start, fin; | |
| const char urlStr[] = "http://retropc.net/tk800/np2x/help.html"; | |
| ICStart(&inst, '????'); | |
| start = 0; | |
| fin = strlen(urlStr); | |
| ICLaunchURL(inst, "\p", urlStr, strlen(urlStr), &start, &fin); | |
| ICStop(inst); | |
| } | |
| } | |
| break; | |
| case kEventClassAppleEvent: | case kEventClassAppleEvent: |
| if (whatHappened == kEventAppleEvent) { | if (whatHappened == kEventAppleEvent) { |
| AEProcessAppleEvent(&eve); | AEProcessAppleEvent(&eve); |
| Line 998 static pascal OSStatus np2windowevent(Ev | Line 1038 static pascal OSStatus np2windowevent(Ev |
| } | } |
| static const EventTypeSpec appEventList[] = { | static const EventTypeSpec appEventList[] = { |
| {kEventClassCommand, kEventCommandProcess }, | |
| {kEventClassAppleEvent, kEventAppleEvent}, | {kEventClassAppleEvent, kEventAppleEvent}, |
| {kEventClassMouse, kEventMouseDown}, | {kEventClassMouse, kEventMouseDown}, |
| #if defined(NP2GCC) | #if defined(NP2GCC) |