comparison src/video/bwindow/SDL_BWin.h @ 5281:15a71bec4a55

merged
author Eric Wing <ewing . public |-at-| gmail . com>
date Sat, 12 Feb 2011 19:16:09 -0800
parents b530ef003506
children
comparison
equal deleted inserted replaced
5219:adfcdd311ae0 5281:15a71bec4a55
1 /* 1 /*
2 SDL - Simple DirectMedia Layer 2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2010 Sam Lantinga 3 Copyright (C) 1997-2011 Sam Lantinga
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version. 8 version 2.1 of the License, or (at your option) any later version.
507 && key_repeat > 0) 507 && key_repeat > 0)
508 break; 508 break;
509 509
510 if (msg->FindInt32("key", &key) == B_OK 510 if (msg->FindInt32("key", &key) == B_OK
511 && msg->FindInt32("modifiers", &modifiers) == B_OK) { 511 && msg->FindInt32("modifiers", &modifiers) == B_OK) {
512 SDL_KeySym keysym; 512 SDL_Keysym keysym;
513 keysym.scancode = key; 513 keysym.scancode = key;
514 if ((key > 0) && (key < 128)) { 514 if ((key > 0) && (key < 128)) {
515 keysym.sym = keymap[key]; 515 keysym.sym = keymap[key];
516 } else { 516 } else {
517 keysym.sym = SDLK_UNKNOWN; 517 keysym.sym = SDLK_UNKNOWN;
541 { 541 {
542 int32 key; 542 int32 key;
543 int32 modifiers; 543 int32 modifiers;
544 if (msg->FindInt32("key", &key) == B_OK 544 if (msg->FindInt32("key", &key) == B_OK
545 && msg->FindInt32("modifiers", &modifiers) == B_OK) { 545 && msg->FindInt32("modifiers", &modifiers) == B_OK) {
546 SDL_KeySym keysym; 546 SDL_Keysym keysym;
547 keysym.scancode = key; 547 keysym.scancode = key;
548 if ((key > 0) && (key < 128)) { 548 if ((key > 0) && (key < 128)) {
549 keysym.sym = keymap[key]; 549 keysym.sym = keymap[key];
550 } else { 550 } else {
551 keysym.sym = SDLK_UNKNOWN; 551 keysym.sym = SDLK_UNKNOWN;
584 584
585 bool shown; 585 bool shown;
586 bool inhibit_resize; 586 bool inhibit_resize;
587 587
588 int32 last_buttons; 588 int32 last_buttons;
589 SDLKey keymap[128]; 589 SDL_Keycode keymap[128];
590 }; 590 };
591 591
592 #endif /* _SDL_BWin_h */ 592 #endif /* _SDL_BWin_h */
593 /* vi: set ts=4 sw=4 expandtab: */ 593 /* vi: set ts=4 sw=4 expandtab: */