~ubuntu-branches/ubuntu/feisty/basilisk2/feisty

« back to all changes in this revision

Viewing changes to src/Windows/main_windows.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2006-06-01 01:11:16 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060601011116-xjhegbgyfsxag5fl
Tags: 0.9.20060529-1
* New upstream CVS snapshot.
* Update local cdbs snippet copyright-check.mk:
  + Broaden scan to also look for "(c)" by default.
  + Make egrep options configurable.
  + Ignore auto-tools files.
* Bump up standards-version to 3.7.2 (no changes needed).
* Let dh_strip do the stripping (not the make install target).

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
#include "kernel_windows.h"
53
53
 
54
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
56
#endif
57
57
 
58
58
#ifdef ENABLE_MON
77
77
 
78
78
 
79
79
// Global variables
 
80
HANDLE emul_thread = NULL;                                                      // Handle of MacOS emulation thread (main thread)
 
81
 
80
82
static uint8 last_xpram[XPRAM_SIZE];                            // Buffer for monitoring XPRAM changes
81
 
 
82
83
static bool xpram_thread_active = false;                        // Flag: XPRAM watchdog installed
83
84
static volatile bool xpram_thread_cancel = false;       // Flag: Cancel XPRAM thread
84
85
static SDL_Thread *xpram_thread = NULL;                         // XPRAM watchdog
305
306
        // Load win32 libraries
306
307
        KernelInit();
307
308
 
 
309
        // FIXME: default to DIB driver
 
310
        if (getenv("SDL_VIDEODRIVER") == NULL)
 
311
            putenv("SDL_VIDEODRIVER=windib");
 
312
 
308
313
        // Initialize SDL system
309
314
        int sdl_flags = 0;
310
315
#ifdef USE_SDL_VIDEO
417
422
                QuitEmulator();
418
423
        D(bug("Initialization complete\n"));
419
424
 
 
425
        // Get handle of main thread
 
426
        emul_thread = GetCurrentThread();
 
427
 
420
428
        // SDL threads available, start 60Hz thread
421
429
        tick_thread_active = ((tick_thread = SDL_CreateThread(tick_func, NULL)) != NULL);
422
430
        if (!tick_thread_active) {
509
517
{
510
518
#if USE_JIT
511
519
    if (UseJIT)
512
 
                flush_icache_range((uintptr)start, size);
 
520
                flush_icache_range((uint8 *)start, size);
513
521
#endif
514
522
}
515
523
 
646
654
 
647
655
#ifdef USE_SDL_VIDEO
648
656
#include <SDL_syswm.h>
649
 
static HWND GetMainWindowHandle(void)
 
657
HWND GetMainWindowHandle(void)
650
658
{
651
659
        SDL_SysWMinfo wmInfo;
652
 
        wmInfo.version.major = SDL_MAJOR_VERSION;
653
 
        wmInfo.version.minor = SDL_MINOR_VERSION;
654
 
        wmInfo.version.patch = SDL_PATCHLEVEL;
 
660
        SDL_VERSION(&wmInfo.version);
655
661
        return SDL_GetWMInfo(&wmInfo) ? wmInfo.window : NULL;
656
662
}
657
663
#endif