comparison src/video/win32/SDL_win32window.c @ 2728:2768bd7281e0

Fixed Visual Studio compilation problems
author Sam Lantinga <slouken@libsdl.org>
date Tue, 26 Aug 2008 07:34:49 +0000
parents f23ebf1ddac4
children 73b9f5fc6690
comparison
equal deleted inserted replaced
2727:76c2fc9696ea 2728:2768bd7281e0
149 WIN_CreateWindow(_THIS, SDL_Window * window) 149 WIN_CreateWindow(_THIS, SDL_Window * window)
150 { 150 {
151 SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; 151 SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
152 RAWINPUTDEVICE Rid; 152 RAWINPUTDEVICE Rid;
153 AXIS TabX, TabY; 153 AXIS TabX, TabY;
154 LOGCONTEXT lc; 154 LOGCONTEXTA lc;
155 HWND hwnd; 155 HWND hwnd;
156 HWND top; 156 HWND top;
157 RECT rect; 157 RECT rect;
158 DWORD style = (WS_CLIPSIBLINGS | WS_CLIPCHILDREN); 158 DWORD style = (WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
159 int x, y; 159 int x, y;
204 WIN_SetError("Couldn't create window"); 204 WIN_SetError("Couldn't create window");
205 return -1; 205 return -1;
206 } 206 }
207 207
208 /* we're configuring the tablet data. See Wintab reference for more info */ 208 /* we're configuring the tablet data. See Wintab reference for more info */
209 if (videodata->wintabDLL && videodata->WTInfo(WTI_DEFSYSCTX, 0, &lc) != 0) { 209 if (videodata->wintabDLL
210 && videodata->WTInfoA(WTI_DEFSYSCTX, 0, &lc) != 0) {
210 lc.lcPktData = PACKETDATA; 211 lc.lcPktData = PACKETDATA;
211 lc.lcPktMode = PACKETMODE; 212 lc.lcPktMode = PACKETMODE;
212 lc.lcOptions |= CXO_MESSAGES; 213 lc.lcOptions |= CXO_MESSAGES;
213 lc.lcOptions |= CXO_SYSTEM; 214 lc.lcOptions |= CXO_SYSTEM;
214 lc.lcMoveMask = PACKETDATA; 215 lc.lcMoveMask = PACKETDATA;
215 lc.lcBtnDnMask = lc.lcBtnUpMask = PACKETDATA; 216 lc.lcBtnDnMask = lc.lcBtnUpMask = PACKETDATA;
216 videodata->WTInfo(WTI_DEVICES, DVC_X, &TabX); 217 videodata->WTInfoA(WTI_DEVICES, DVC_X, &TabX);
217 videodata->WTInfo(WTI_DEVICES, DVC_Y, &TabY); 218 videodata->WTInfoA(WTI_DEVICES, DVC_Y, &TabY);
218 lc.lcInOrgX = 0; 219 lc.lcInOrgX = 0;
219 lc.lcInOrgY = 0; 220 lc.lcInOrgY = 0;
220 lc.lcInExtX = TabX.axMax; 221 lc.lcInExtX = TabX.axMax;
221 lc.lcInExtY = TabY.axMax; 222 lc.lcInExtY = TabY.axMax;
222 lc.lcOutOrgX = 0; 223 lc.lcOutOrgX = 0;
233 DestroyWindow(hwnd); 234 DestroyWindow(hwnd);
234 return -1; 235 return -1;
235 } 236 }
236 g_hCtx = tmp_hctx; 237 g_hCtx = tmp_hctx;
237 } 238 }
238 g_hCtx[window->id] = videodata->WTOpen(hwnd, &lc, TRUE); 239 g_hCtx[window->id] = videodata->WTOpenA(hwnd, &lc, TRUE);
239 } 240 }
240 241
241 /* we're telling the window, we want it to report raw input events from mice */ 242 /* we're telling the window, we want it to report raw input events from mice */
242 Rid.usUsagePage = 0x01; 243 Rid.usUsagePage = 0x01;
243 Rid.usUsage = 0x02; 244 Rid.usUsage = 0x02;