File: 02-enter-keys.patch

package info (click to toggle)
abe 1.1%2Bdfsg-6.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,112 kB
  • sloc: ansic: 5,468; sh: 2,725; objc: 224; makefile: 48
file content (60 lines) | stat: -rw-r--r-- 1,600 bytes parent folder | download | duplicates (5)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From: Bart Martens <bartm@debian.org>
Date: Sat, 11 Jun 2016 10:52:24 +0200
Subject: 02 enter keys

Fixes the return/enter key on some keyboards
---
 src/Editor.c | 1 +
 src/Game.c   | 1 +
 src/Icons.c  | 1 +
 src/Splash.c | 1 +
 4 files changed, 4 insertions(+)

diff --git a/src/Editor.c b/src/Editor.c
index 845e35b..1a73d43 100644
--- a/src/Editor.c
+++ b/src/Editor.c
@@ -298,6 +298,7 @@ editorMainLoop(SDL_Event * event)
       cursor.dir = DIR_NONE;
       map.redraw = 1;
       break;
+    case SDLK_KP_ENTER:
     case SDLK_RETURN:
       setImage(edit_panel.level, edit_panel.image_index);
       break;
diff --git a/src/Game.c b/src/Game.c
index 8d9532e..a5cbcb1 100644
--- a/src/Game.c
+++ b/src/Game.c
@@ -386,6 +386,7 @@ gameMainLoop(SDL_Event * event)
       game.keys++;
       break;
 #endif
+    case SDLK_KP_ENTER:
     case SDLK_RETURN:
       if(!game.end_game) {
         if(!game.balloonTimer && game.balloons) {
diff --git a/src/Icons.c b/src/Icons.c
index 29f7303..9eaea45 100644
--- a/src/Icons.c
+++ b/src/Icons.c
@@ -99,6 +99,7 @@ selectIcon()
           icon_selection = -1;
           goto escape;
         case SDLK_SPACE:
+        case SDLK_KP_ENTER:
         case SDLK_RETURN:
           goto escape;
         case SDLK_LEFT:
diff --git a/src/Splash.c b/src/Splash.c
index 6b3e7d1..d6605ac 100644
--- a/src/Splash.c
+++ b/src/Splash.c
@@ -40,6 +40,7 @@ splashMainLoop(SDL_Event * event)
       if(menu_y < 0)
         menu_y = FONT_HEIGHT * (GOD_MODE ? 4 : 3);
       break;
+    case SDLK_KP_ENTER:
     case SDLK_RETURN:
     case SDLK_SPACE:
       map.quit = 1;