ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/kpx_cpu/sheepshaver_glue.cpp
(Generate patch)

Comparing SheepShaver/src/kpx_cpu/sheepshaver_glue.cpp (file contents):
Revision 1.46 by gbeauche, 2004-06-22T17:10:08Z vs.
Revision 1.48 by gbeauche, 2004-06-26T15:26:18Z

# Line 43 | Line 43
43   #include <stdio.h>
44   #include <stdlib.h>
45  
46 + #ifdef USE_SDL_VIDEO
47 + #include <SDL_events.h>
48 + #endif
49 +
50   #if ENABLE_MON
51   #include "mon.h"
52   #include "mon_disass.h"
# Line 108 | Line 112 | const uint32 POWERPC_EXEC_RETURN = POWER
112   static KernelData * const kernel_data = (KernelData *)KERNEL_DATA_BASE;
113  
114   // SIGSEGV handler
115 < static sigsegv_return_t sigsegv_handler(sigsegv_address_t, sigsegv_address_t);
115 > sigsegv_return_t sigsegv_handler(sigsegv_address_t, sigsegv_address_t);
116  
117   #if PPC_ENABLE_JIT && PPC_REENTRANT_JIT
118   // Special trampolines for EmulOp and NativeOp
# Line 876 | Line 880 | static void dump_log(void)
880   *  Initialize CPU emulation
881   */
882  
883 < static sigsegv_return_t sigsegv_handler(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction)
883 > sigsegv_return_t sigsegv_handler(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction)
884   {
885   #if ENABLE_VOSF
886          // Handle screen fault
# Line 954 | Line 958 | void init_emul_ppc(void)
958          ppc_cpu->set_register(powerpc_registers::GPR(4), any_register(KernelDataAddr + 0x1000));
959          WriteMacInt32(XLM_RUN_MODE, MODE_68K);
960  
957        // Install the handler for SIGSEGV
958        sigsegv_install_handler(sigsegv_handler);
959
961   #if ENABLE_MON
962          // Install "regs" command in cxmon
963          mon_add_command("regs", dump_registers, "regs                     Dump PowerPC registers\n");
# Line 1059 | Line 1060 | void TriggerInterrupt(void)
1060  
1061   void sheepshaver_cpu::handle_interrupt(void)
1062   {
1063 + #ifdef USE_SDL_VIDEO
1064 +        // We must fill in the events queue in the same thread that did call SDL_SetVideoMode()
1065 +        SDL_PumpEvents();
1066 + #endif
1067 +
1068          // Do nothing if interrupts are disabled
1069          if (int32(ReadMacInt32(XLM_IRQ_NEST)) > 0)
1070                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines