Mercurial > sdl-ios-xcode
comparison src/video/windx5/SDL_dx5video.c @ 3992:c75679dce60c SDL-1.2
Fixed bug #335
Use SetSystemPaletteUse() to get better access to the system palette.
We can still do better palette matching in the case where we aren't
using fullscreen mode or a hardware palette, but that can wait for
another day. :)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 03 Jul 2007 09:05:51 +0000 |
parents | 339d733e3699 |
children | 7cd5a59480a4 |
comparison
equal
deleted
inserted
replaced
3991:7a649501c089 | 3992:c75679dce60c |
---|---|
425 | 425 |
426 static int DX5_AllocDDSurface(_THIS, SDL_Surface *surface, | 426 static int DX5_AllocDDSurface(_THIS, SDL_Surface *surface, |
427 LPDIRECTDRAWSURFACE3 requested, Uint32 flag); | 427 LPDIRECTDRAWSURFACE3 requested, Uint32 flag); |
428 | 428 |
429 /* Windows message handling functions */ | 429 /* Windows message handling functions */ |
430 static void DX5_Activate(_THIS, BOOL active, BOOL minimized); | |
430 static void DX5_RealizePalette(_THIS); | 431 static void DX5_RealizePalette(_THIS); |
431 static void DX5_PaletteChanged(_THIS, HWND window); | 432 static void DX5_PaletteChanged(_THIS, HWND window); |
432 static void DX5_WinPAINT(_THIS, HDC hdc); | 433 static void DX5_WinPAINT(_THIS, HDC hdc); |
433 | 434 |
434 /* WinDIB driver functions for manipulating gamma ramps */ | 435 /* WinDIB driver functions for manipulating gamma ramps */ |
618 device->CheckMouseMode = WIN_CheckMouseMode; | 619 device->CheckMouseMode = WIN_CheckMouseMode; |
619 device->InitOSKeymap = DX5_InitOSKeymap; | 620 device->InitOSKeymap = DX5_InitOSKeymap; |
620 device->PumpEvents = DX5_PumpEvents; | 621 device->PumpEvents = DX5_PumpEvents; |
621 | 622 |
622 /* Set up the windows message handling functions */ | 623 /* Set up the windows message handling functions */ |
624 WIN_Activate = DX5_Activate; | |
623 WIN_RealizePalette = DX5_RealizePalette; | 625 WIN_RealizePalette = DX5_RealizePalette; |
624 WIN_PaletteChanged = DX5_PaletteChanged; | 626 WIN_PaletteChanged = DX5_PaletteChanged; |
625 WIN_WinPAINT = DX5_WinPAINT; | 627 WIN_WinPAINT = DX5_WinPAINT; |
626 HandleMessage = DX5_HandleMessage; | 628 HandleMessage = DX5_HandleMessage; |
627 | 629 |
2419 screen_icn = NULL; | 2421 screen_icn = NULL; |
2420 } | 2422 } |
2421 } | 2423 } |
2422 | 2424 |
2423 /* Exported for the windows message loop only */ | 2425 /* Exported for the windows message loop only */ |
2426 void DX5_Activate(_THIS, BOOL active, BOOL minimized) | |
2427 { | |
2428 } | |
2424 void DX5_RealizePalette(_THIS) | 2429 void DX5_RealizePalette(_THIS) |
2425 { | 2430 { |
2426 if ( SDL_palette ) { | 2431 if ( SDL_palette ) { |
2427 IDirectDrawSurface3_SetPalette(SDL_primary, SDL_palette); | 2432 IDirectDrawSurface3_SetPalette(SDL_primary, SDL_palette); |
2428 } | 2433 } |