comparison src/video/wincommon/SDL_sysevents.c @ 457:d0ab9718bf91

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Tue, 20 Aug 2002 04:49:05 +0000
parents a6fa62b1be09
children 2a778055dbba
comparison
equal deleted inserted replaced
456:b4e14b15af3c 457:d0ab9718bf91
312 SetFocus(SDL_Window); 312 SetFocus(SDL_Window);
313 313
314 /* Figure out which button to use */ 314 /* Figure out which button to use */
315 switch (msg) { 315 switch (msg) {
316 case WM_LBUTTONDOWN: 316 case WM_LBUTTONDOWN:
317 button = 1; 317 button = SDL_BUTTON_LEFT;
318 state = SDL_PRESSED; 318 state = SDL_PRESSED;
319 break; 319 break;
320 case WM_LBUTTONUP: 320 case WM_LBUTTONUP:
321 button = 1; 321 button = SDL_BUTTON_LEFT;
322 state = SDL_RELEASED; 322 state = SDL_RELEASED;
323 break; 323 break;
324 case WM_MBUTTONDOWN: 324 case WM_MBUTTONDOWN:
325 button = 2; 325 button = SDL_BUTTON_MIDDLE;
326 state = SDL_PRESSED; 326 state = SDL_PRESSED;
327 break; 327 break;
328 case WM_MBUTTONUP: 328 case WM_MBUTTONUP:
329 button = 2; 329 button = SDL_BUTTON_MIDDLE;
330 state = SDL_RELEASED; 330 state = SDL_RELEASED;
331 break; 331 break;
332 case WM_RBUTTONDOWN: 332 case WM_RBUTTONDOWN:
333 button = 3; 333 button = SDL_BUTTON_RIGHT;
334 state = SDL_PRESSED; 334 state = SDL_PRESSED;
335 break; 335 break;
336 case WM_RBUTTONUP: 336 case WM_RBUTTONUP:
337 button = 3; 337 button = SDL_BUTTON_RIGHT;
338 state = SDL_RELEASED; 338 state = SDL_RELEASED;
339 break; 339 break;
340 default: 340 default:
341 /* Eh? Unknown button? */ 341 /* Eh? Unknown button? */
342 return(0); 342 return(0);
580 } 580 }
581 581
582 /* Register the application class */ 582 /* Register the application class */
583 class.hCursor = NULL; 583 class.hCursor = NULL;
584 #ifdef _WIN32_WCE 584 #ifdef _WIN32_WCE
585 { 585 {
586 /* WinCE uses the UNICODE version */ 586 /* WinCE uses the UNICODE version */
587 int nLen = strlen(name)+1; 587 int nLen = strlen(name)+1;
588 SDL_Appname = malloc(nLen*2); 588 SDL_Appname = malloc(nLen*2);
589 MultiByteToWideChar(CP_ACP, 0, name, -1, SDL_Appname, nLen); 589 MultiByteToWideChar(CP_ACP, 0, name, -1, SDL_Appname, nLen);
590 } 590 }
591 #else 591 #else
592 { 592 {
593 int nLen = strlen(name)+1; 593 int nLen = strlen(name)+1;
594 SDL_Appname = malloc(nLen); 594 SDL_Appname = malloc(nLen);
595 strcpy(SDL_Appname, name); 595 strcpy(SDL_Appname, name);