From 1043ec1df97cc0f6184a1ecd0960732d3b76e05a Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Mon, 20 Jan 2003 08:01:45 +0000 Subject: Fix GDI display for HPCs svn-id: r6527 --- backends/wince/screen.cpp | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'backends/wince') diff --git a/backends/wince/screen.cpp b/backends/wince/screen.cpp index 468e23e49a..8e0aa25e84 100644 --- a/backends/wince/screen.cpp +++ b/backends/wince/screen.cpp @@ -337,7 +337,7 @@ int GraphicsOn(HWND hWndMain_param, bool gfx_mode_switch) _gfx_device = DEVICE_GAPI; - if (dynamicGXOpenDisplay(hWndMain, GX_FULLSCREEN) == GAPI_SIMU) + if (!noGAPI && dynamicGXOpenDisplay(hWndMain, GX_FULLSCREEN) == GAPI_SIMU) _gfx_device = DEVICE_VIDEO; _gfx_mode_switch = gfx_mode_switch; @@ -353,7 +353,13 @@ int GraphicsOn(HWND hWndMain_param, bool gfx_mode_switch) memset(&gxdp, 0, sizeof(gxdp)); - gxdp = dynamicGXGetDisplayProperties(); + if (!noGAPI) + gxdp = dynamicGXGetDisplayProperties(); + else { + gxdp.cxWidth = GetSystemMetrics(SM_CXSCREEN); + gxdp.cyHeight = GetSystemMetrics(SM_CYSCREEN); + gxdp.ffFormat = 0xA8; + } // Possible Aero problem @@ -2114,16 +2120,16 @@ void noGAPI_Set_565(INT16 *buffer, int pitch, int x, int y, int width, int heigh UBYTE *work_buffer; int i; int j; - long skipmask; + //long skipmask; - skipmask = geom[useMode].xSkipMask; + //skipmask = geom[useMode].xSkipMask; GetWindowRect(hWndMain, &rc); work_buffer = noGAPI_video_buffer; unsigned short *work_buffer_2 = (unsigned short*)work_buffer; - if (currentScreenMode || wide_screen) { + if (currentScreenMode && !wide_screen) { for (i=0; i