Package: freedroidrpg / 1.0~rc2-1

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

--- freedroidrpg.orig/src/input.c
+++ freedroidrpg/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()
--- freedroidrpg.orig/src/text.c
+++ freedroidrpg/src/text.c
@@ -600,7 +600,7 @@
 
 		int key = getchar_ascii(); // last 'character' entered
 
-		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) {