--- np2/macosx/np2.cpp 2003/10/24 19:19:58 1.16 +++ np2/macosx/np2.cpp 2003/10/25 16:07:34 1.20 @@ -3,6 +3,7 @@ #include "strres.h" #include "np2.h" #include "dosio.h" +#include "commng.h" #include "scrnmng.h" #include "soundmng.h" #include "sysmng.h" @@ -36,7 +37,7 @@ #ifdef NP2OPENING #include -#define OPENING_WAIT 1500 +// #define OPENING_WAIT 1500 #endif @@ -169,6 +170,11 @@ static void HandleMenuChoice(long wParam newhdddisk(); break; #endif + + case IDM_FONT: + dialog_font(); + break; + case IDM_EXIT: np2running = FALSE; break; @@ -562,8 +568,8 @@ static void eventproc(EventRecord *event static void processwait(UINT waitcnt) { if (timing_getcount() >= waitcnt) { - timing_setcount(0); framecnt = 0; + timing_setcount(0); if (np2oscfg.DISPCLK & 3) { if (sysmng_workclockrenewal()) { sysmng_updatecaption(3); @@ -716,6 +722,7 @@ int main(int argc, char *argv[]) { return(0); } + commng_initialize(); sysmng_initialize(); mackbd_initialize(); pccore_init(); @@ -811,7 +818,7 @@ int main(int argc, char *argv[]) { else { timing_setcount(cnt - framecnt); } - framecnt = 0; + processwait(0); } } else { @@ -975,9 +982,9 @@ static pascal OSStatus np2windowevent(Ev break; case kEventRawKeyDown: if (modif & cmdKey) { - char para; - GetEventParameter (event, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, ¶); - HandleMenuChoice(MenuKey(para)); + EventRecord eve; + ConvertEventRefToEventRecord( event,&eve ); + HandleMenuChoice(MenuEvent(&eve)); } else { mackbd_f12down(key); @@ -1031,10 +1038,10 @@ static void setUpCarbonEvent(void) { InstallStandardEventHandler(GetWindowEventTarget(hWndMain)); InstallApplicationEventHandler(NewEventHandlerUPP(np2appevent), - sizeof(appEventList)/sizeof(EventTypeSpec), + GetEventTypeCount(appEventList), appEventList, 0, NULL); InstallWindowEventHandler(hWndMain, NewEventHandlerUPP(np2windowevent), - sizeof(windEventList)/sizeof(EventTypeSpec), + GetEventTypeCount(windEventList), windEventList, 0, NULL); }