Package: freedroidrpg / 0.16.1-4

20_enter_keys.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Author: Bart Martens
Description: Fixes enter key on some keyboards
Forwarded: no

--- a/src/input.c
+++ b/src/input.c
@@ -189,7 +189,7 @@
 
 int EnterPressed()
 {
-	return key_is_pressed(SDLK_RETURN);
+	return key_is_pressed(SDLK_RETURN) || key_is_pressed(SDLK_KP_ENTER);
 }
 
 int EscapePressed()
--- a/src/text.c
+++ b/src/text.c
@@ -597,7 +597,7 @@
 
 		key = getchar_raw(NULL);
 
-		if (key == SDLK_RETURN) {
+		if (key == SDLK_RETURN || key == SDLK_KP_ENTER) {
 			// Display the image again so both buffers are in sync
 			// useful for GL drivers that do true pageflipping (win32, nvidia 173.x, ...)
 			if (use_open_gl) {