From 247f6e23bbfe4b453aed75dd00097e63400fe680 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 11 Apr 2002 18:22:05 +0000 Subject: [PATCH] Fixed spurious keypress at startup on BeOS --- src/video/bwindow/SDL_sysevents.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/video/bwindow/SDL_sysevents.cc b/src/video/bwindow/SDL_sysevents.cc index 136e544c9..0b12f357f 100644 --- a/src/video/bwindow/SDL_sysevents.cc +++ b/src/video/bwindow/SDL_sysevents.cc @@ -288,9 +288,12 @@ void BE_InitOSKeymap(_THIS) { unsigned int i; - /* Initialize all the key states as "up" */ + /* Initialize the keyboard state */ key_flip = 0; - memset(keyinfo[key_flip].key_states, 0, 16); + get_key_info(&keyinfo[key_flip]); + memcpy(keyinfo[!key_flip].key_states, + keyinfo[key_flip].key_states, + SDL_TABLESIZE(keyinfo[key_flip].key_states)); /* Initialize the BeOS key translation table */ /* Source: and BeOS keyboard info */