Skip to content

Commit

Permalink
Merge pull request #203 from Shamus397/consol-fix
Browse files Browse the repository at this point in the history
Fix for issue #199 (BBSB warp doesn't work)
  • Loading branch information
joysfera committed Nov 30, 2023
2 parents 0b8b5ef + c0ece24 commit b57dc67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/atari_x11.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,15 +442,12 @@ static int GetKeyCode(XEvent *event)
break;
case XK_F2:
keyboard_consol &= (~INPUT_CONSOL_OPTION);
keycode = AKEY_NONE;
break;
case XK_F3:
keyboard_consol &= (~INPUT_CONSOL_SELECT);
keycode = AKEY_NONE;
break;
case XK_F4:
keyboard_consol &= (~INPUT_CONSOL_START);
keycode = AKEY_NONE;
break;
case XK_F6:
keycode = SHIFT | CONTROL | AKEY_HELP;
Expand Down
14 changes: 14 additions & 0 deletions src/sdl/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,25 @@ int PLATFORM_Keyboard(void)
event_found = 1;
switch (event.type) {
case SDL_KEYDOWN:

/* If the KEYDOWN event we get here is OPTION, SELECT, or START, then ignore it here as it's supposed to be it's own independent (i.e., separate from the keyboard) subsystem. */
if ((event.key.keysym.sym == KBD_OPTION)
|| (event.key.keysym.sym == KBD_SELECT)
|| (event.key.keysym.sym == KBD_START))
break;

lastkey = event.key.keysym.sym;
lastuni = event.key.keysym.unicode;
key_pressed = 1;
break;
case SDL_KEYUP:

/* Need to ignore KEYUP as well... */
if ((event.key.keysym.sym == KBD_OPTION)
|| (event.key.keysym.sym == KBD_SELECT)
|| (event.key.keysym.sym == KBD_START))
break;

lastkey = event.key.keysym.sym;
lastuni = 0; /* event.key.keysym.unicode is not defined for KEYUP */
key_pressed = 0;
Expand Down

0 comments on commit b57dc67

Please sign in to comment.