|
|
| version 1.27, 2003/11/03 10:19:43 | version 1.32, 2003/11/06 18:27:59 |
|---|---|
| Line 37 | Line 37 |
| #include "midiopt.h" | #include "midiopt.h" |
| #include "macalert.h" | #include "macalert.h" |
| #include "np2opening.h" | #include "np2opening.h" |
| #include "toolmac.h" | #include "toolwin.h" |
| #include <QuickTime/QuickTime.h> | #include <QuickTime/QuickTime.h> |
| #define USE_RESUME | #define USE_RESUME |
| Line 547 static void HandleMouseDown(EventRecord | Line 547 static void HandleMouseDown(EventRecord |
| // ---- | // ---- |
| static void framereset(UINT waitcnt) { | |
| framecnt = 0; | |
| toolwin_draw((BYTE)waitcnt); | |
| if (np2oscfg.DISPCLK & 3) { | |
| if (sysmng_workclockrenewal()) { | |
| sysmng_updatecaption(3); | |
| } | |
| } | |
| } | |
| static void processwait(UINT waitcnt) { | static void processwait(UINT waitcnt) { |
| if (timing_getcount() >= waitcnt) { | if (timing_getcount() >= waitcnt) { |
| framecnt = 0; | |
| timing_setcount(0); | timing_setcount(0); |
| toolwin_draw((BYTE)waitcnt); | framereset(waitcnt); |
| if (np2oscfg.DISPCLK & 3) { | |
| if (sysmng_workclockrenewal()) { | |
| sysmng_updatecaption(3); | |
| } | |
| } | |
| } | } |
| } | } |
| Line 615 int main(int argc, char *argv[]) { | Line 620 int main(int argc, char *argv[]) { |
| #ifdef OPENING_WAIT | #ifdef OPENING_WAIT |
| UINT32 tick; | UINT32 tick; |
| #endif | #endif |
| dosio_init(); | dosio_init(); |
| file_setcd(target); | file_setcd(target); |
| Line 748 int main(int argc, char *argv[]) { | Line 753 int main(int argc, char *argv[]) { |
| else { | else { |
| timing_setcount(cnt - framecnt); | timing_setcount(cnt - framecnt); |
| } | } |
| processwait(0); | framereset(0); |
| } | } |
| } | } |
| else { | else { |
| Line 765 int main(int argc, char *argv[]) { | Line 770 int main(int argc, char *argv[]) { |
| toggleFullscreen(); | toggleFullscreen(); |
| } | } |
| toolwin_writeini(); | |
| pccore_cfgupdate(); | pccore_cfgupdate(); |
| #if defined(USE_RESUME) | #if defined(USE_RESUME) |
| Line 789 int main(int argc, char *argv[]) { | Line 793 int main(int argc, char *argv[]) { |
| scrnmng_destroy(); | scrnmng_destroy(); |
| if (sys_updates & (SYS_UPDATECFG | SYS_UPDATEOSCFG)) { | if (sys_updates & (SYS_UPDATECFG | SYS_UPDATEOSCFG)) { |
| initsave(); | initsave(); // np2.cfg create |
| toolwin_writeini(); // np2.cfg append | |
| } | } |
| TRACETERM(); | TRACETERM(); |
| macossub_term(); | macossub_term(); |
| Line 905 static pascal OSStatus np2windowevent(Ev | Line 910 static pascal OSStatus np2windowevent(Ev |
| switch (whatHappened) | switch (whatHappened) |
| { | { |
| case kEventWindowClose: | case kEventWindowClose: |
| np2running = FALSE; | taskmng_exit(); |
| result = noErr; | result = noErr; |
| break; | break; |
| case kEventWindowActivated: | case kEventWindowActivated: |
| Line 920 static pascal OSStatus np2windowevent(Ev | Line 925 static pascal OSStatus np2windowevent(Ev |
| case kEventWindowDragCompleted: | case kEventWindowDragCompleted: |
| soundmng_play(); | soundmng_play(); |
| break; | break; |
| case kEventWindowShown: | |
| scrndraw_redraw(); | |
| break; | |
| } | } |
| break; | break; |
| case kEventClassKeyboard: | case kEventClassKeyboard: |
| Line 988 static const EventTypeSpec windEventList | Line 996 static const EventTypeSpec windEventList |
| {kEventClassWindow, kEventWindowToolbarSwitchMode}, | {kEventClassWindow, kEventWindowToolbarSwitchMode}, |
| {kEventClassWindow, kEventWindowDragStarted}, | {kEventClassWindow, kEventWindowDragStarted}, |
| {kEventClassWindow, kEventWindowDragCompleted}, | {kEventClassWindow, kEventWindowDragCompleted}, |
| {kEventClassWindow, kEventWindowShown}, | |
| {kEventClassKeyboard, kEventRawKeyDown}, | {kEventClassKeyboard, kEventRawKeyDown}, |
| {kEventClassKeyboard, kEventRawKeyUp}, | {kEventClassKeyboard, kEventRawKeyUp}, |
| {kEventClassKeyboard, kEventRawKeyRepeat}, | {kEventClassKeyboard, kEventRawKeyRepeat}, |
| Line 1004 static void setUpCarbonEvent(void) { | Line 1013 static void setUpCarbonEvent(void) { |
| InstallWindowEventHandler(hWndMain, NewEventHandlerUPP(np2windowevent), | InstallWindowEventHandler(hWndMain, NewEventHandlerUPP(np2windowevent), |
| GetEventTypeCount(windEventList), | GetEventTypeCount(windEventList), |
| windEventList, 0, NULL); | windEventList, 0, NULL); |
| InstallStandardEventHandler(GetWindowEventTarget(hWndMain)); | |
| } | } |
| static bool setupMainWindow(void) { | static bool setupMainWindow(void) { |