ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Windows/main_windows.cpp
(Generate patch)

Comparing BasiliskII/src/Windows/main_windows.cpp (file contents):
Revision 1.7 by gbeauche, 2005-11-22T06:26:35Z vs.
Revision 1.10 by gbeauche, 2006-05-08T16:56:07Z

# Line 52 | Line 52 | using std::string;
52   #include "kernel_windows.h"
53  
54   #if USE_JIT
55 < extern void flush_icache_range(uint32 start, uint32 size); // from compemu_support.cpp
55 > extern void flush_icache_range(uint8 *start, uint32 size); // from compemu_support.cpp
56   #endif
57  
58   #ifdef ENABLE_MON
# Line 77 | Line 77 | bool ThirtyThreeBitAddressing = false;
77  
78  
79   // Global variables
80 < static uint8 last_xpram[XPRAM_SIZE];                            // Buffer for monitoring XPRAM changes
80 > HANDLE emul_thread = NULL;                                                      // Handle of MacOS emulation thread (main thread)
81  
82 + static uint8 last_xpram[XPRAM_SIZE];                            // Buffer for monitoring XPRAM changes
83   static bool xpram_thread_active = false;                        // Flag: XPRAM watchdog installed
84   static volatile bool xpram_thread_cancel = false;       // Flag: Cancel XPRAM thread
85   static SDL_Thread *xpram_thread = NULL;                         // XPRAM watchdog
# Line 421 | Line 422 | int main(int argc, char **argv)
422                  QuitEmulator();
423          D(bug("Initialization complete\n"));
424  
425 +        // Get handle of main thread
426 +        emul_thread = GetCurrentThread();
427 +
428          // SDL threads available, start 60Hz thread
429          tick_thread_active = ((tick_thread = SDL_CreateThread(tick_func, NULL)) != NULL);
430          if (!tick_thread_active) {
# Line 513 | Line 517 | void FlushCodeCache(void *start, uint32
517   {
518   #if USE_JIT
519      if (UseJIT)
520 <                flush_icache_range((uintptr)start, size);
520 >                flush_icache_range((uint8 *)start, size);
521   #endif
522   }
523  
# Line 650 | Line 654 | static int tick_func(void *arg)
654  
655   #ifdef USE_SDL_VIDEO
656   #include <SDL_syswm.h>
657 < static HWND GetMainWindowHandle(void)
657 > HWND GetMainWindowHandle(void)
658   {
659          SDL_SysWMinfo wmInfo;
660 <        wmInfo.version.major = SDL_MAJOR_VERSION;
657 <        wmInfo.version.minor = SDL_MINOR_VERSION;
658 <        wmInfo.version.patch = SDL_PATCHLEVEL;
660 >        SDL_VERSION(&wmInfo.version);
661          return SDL_GetWMInfo(&wmInfo) ? wmInfo.window : NULL;
662   }
663   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines