tetris: the # key emits XK_KP_Divide on this device, register that for pause
Correct the pause binding: the physical # key produces XK_KP_Divide (previously assumed XK_slash). On-screen label still reads '# PAUSE'.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -433,9 +433,9 @@ static void handle_key(KeySym ks) {
|
||||
if (state == PLAYING) { hard_drop(); }
|
||||
break;
|
||||
// Pause: P, 3, *, and the # key. NOTE: on this device the # key emits
|
||||
// XK_slash (not XK_numbersign), so register slash too while the on-screen
|
||||
// label still shows '#'.
|
||||
case XK_p: case XK_3: case XK_numbersign: case XK_asterisk: case XK_slash:
|
||||
// XK_KP_Divide (not XK_numbersign), so register KP_Divide too while the
|
||||
// on-screen label still shows '#'.
|
||||
case XK_p: case XK_3: case XK_numbersign: case XK_asterisk: case XK_KP_Divide:
|
||||
if (state == PLAYING) {
|
||||
state = PAUSED;
|
||||
} else if (state == PAUSED) {
|
||||
|
||||
Reference in New Issue
Block a user