From a60b0fb78c8362e6bd88bdea637a77bace3fcc54 Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Thu, 30 Jun 2005 22:26:12 +0000 Subject: [PATCH] Restore clobbered registers before calling SDL_PumpEvents(). --- SheepShaver/src/Unix/main_unix.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/SheepShaver/src/Unix/main_unix.cpp b/SheepShaver/src/Unix/main_unix.cpp index 41b120f8..f1b1c4ca 100644 --- a/SheepShaver/src/Unix/main_unix.cpp +++ b/SheepShaver/src/Unix/main_unix.cpp @@ -1575,15 +1575,6 @@ void sigusr2_handler(int sig, siginfo_t *sip, void *scp) { machine_regs *r = MACHINE_REGISTERS(scp); -#ifdef USE_SDL_VIDEO - // We must fill in the events queue in the same thread that did call SDL_SetVideoMode() - SDL_PumpEvents(); -#endif - - // Do nothing if interrupts are disabled - if (*(int32 *)XLM_IRQ_NEST > 0) - return; - #ifdef SYSTEM_CLOBBERS_R2 // Restore pointer to Thread Local Storage set_r2(TOC); @@ -1593,6 +1584,15 @@ void sigusr2_handler(int sig, siginfo_t *sip, void *scp) set_r13(R13); #endif +#ifdef USE_SDL_VIDEO + // We must fill in the events queue in the same thread that did call SDL_SetVideoMode() + SDL_PumpEvents(); +#endif + + // Do nothing if interrupts are disabled + if (*(int32 *)XLM_IRQ_NEST > 0) + return; + // Disable MacOS stack sniffer WriteMacInt32(0x110, 0);