Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_win32mouse.c @ 3097:0d12e8f1de3c
Date: Thu, 05 Feb 2009 18:07:35 +0100
From: Stefan Klug
Subject: [SDL] SDL 1.3 WinCE backend
as promised, I've started to work on the WinCE backend of SDL 1.3
I've modified the win32 video backend and the gdi renderer, to work
properly in WinCE.
The results till now are great, but there is still some work to do.
Attached are two patches with my changes.
I would be happy if someone could review and propably commit them.
The first one (configure.in.patch) should be straight forward without
any side effects.
The second one does the necessary changes to the win32 backend. I was
really unhappy to start slicing this shiny new backend with
#ifdef/#endif but I saw no other option.
The most problematic issues are:
- WinCe has no GetDIBits, so its practically impossible to fill a
BITMAPINFO with correct values. I therefore removed the bmi member from
the GDI_RenderData in SDL_gdirender.c to prevent usage of a not or not
properly initialized bmi.
- In SDL_win32window.c I exchanged some ASCII function by their general
counterparts, (In CE only the Unicode versions are available). I don't
know if this has a negative effect when running in win32
Cheers
Stefan
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 23 Mar 2009 05:35:21 +0000 |
parents | 502adab079a4 |
children | 5d7ef5970073 |
comparison
equal
deleted
inserted
replaced
3096:ae4e80dbe330 | 3097:0d12e8f1de3c |
---|---|
48 char *buffer = NULL; | 48 char *buffer = NULL; |
49 char *tab = "wacom"; /* since windows does't give us handles to tablets, we have to detect a tablet by it's name */ | 49 char *tab = "wacom"; /* since windows does't give us handles to tablets, we have to detect a tablet by it's name */ |
50 const char *rdp = "rdp_mou"; | 50 const char *rdp = "rdp_mou"; |
51 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; | 51 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; |
52 | 52 |
53 /* WinCE has no RawInputDeviceList */ | |
54 #ifdef _WIN32_WCE | |
55 SDL_Mouse mouse; | |
56 SDL_zero(mouse); | |
57 mouse.id = 0; | |
58 SDL_AddMouse(&mouse, "Stylus", 0, 0, 1); | |
59 #else | |
53 /* we're checking for the number of rawinput devices */ | 60 /* we're checking for the number of rawinput devices */ |
54 if (GetRawInputDeviceList(NULL, &devCount, sizeof(RAWINPUTDEVICELIST))) { | 61 if (GetRawInputDeviceList(NULL, &devCount, sizeof(RAWINPUTDEVICELIST))) { |
55 return; | 62 return; |
56 } | 63 } |
57 | 64 |
188 SDL_free(buffer); | 195 SDL_free(buffer); |
189 SDL_free(key_name); | 196 SDL_free(key_name); |
190 } | 197 } |
191 total_mice = index; | 198 total_mice = index; |
192 SDL_free(deviceList); | 199 SDL_free(deviceList); |
200 #endif /*_WIN32_WCE*/ | |
193 } | 201 } |
194 | 202 |
195 void | 203 void |
196 WIN_QuitMouse(_THIS) | 204 WIN_QuitMouse(_THIS) |
197 { | 205 { |