comparison src/video/bwindow/SDL_sysevents.cc @ 339:eed579d059ef

Fixed spurious keypress at startup on BeOS
author Sam Lantinga <slouken@libsdl.org>
date Thu, 11 Apr 2002 18:22:05 +0000
parents f6ffac90895c
children b8d311d90021
comparison
equal deleted inserted replaced
338:518ffd98a8f6 339:eed579d059ef
286 286
287 void BE_InitOSKeymap(_THIS) 287 void BE_InitOSKeymap(_THIS)
288 { 288 {
289 unsigned int i; 289 unsigned int i;
290 290
291 /* Initialize all the key states as "up" */ 291 /* Initialize the keyboard state */
292 key_flip = 0; 292 key_flip = 0;
293 memset(keyinfo[key_flip].key_states, 0, 16); 293 get_key_info(&keyinfo[key_flip]);
294 memcpy(keyinfo[!key_flip].key_states,
295 keyinfo[key_flip].key_states,
296 SDL_TABLESIZE(keyinfo[key_flip].key_states));
294 297
295 /* Initialize the BeOS key translation table */ 298 /* Initialize the BeOS key translation table */
296 /* Source: <be/interface/InterfaceDefs.h> and BeOS keyboard info */ 299 /* Source: <be/interface/InterfaceDefs.h> and BeOS keyboard info */
297 for ( i=0; i<SDL_TABLESIZE(keymap); ++i ) 300 for ( i=0; i<SDL_TABLESIZE(keymap); ++i )
298 keymap[i] = SDLK_UNKNOWN; 301 keymap[i] = SDLK_UNKNOWN;