abe (1.1-3) 02_enter_keys.diff

Summary

 src/Editor.c |    1 +
 src/Game.c   |    1 +
 src/Icons.c  |    1 +
 src/Splash.c |    1 +
 4 files changed, 4 insertions(+)

    
download this patch

Patch contents

Fixes the return/enter key on some keyboards.


diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/abe-1.1/src/Editor.c ./src/Editor.c
--- ../orig/abe-1.1/src/Editor.c	2005-03-05 17:20:04.000000000 +0100
+++ ./src/Editor.c	2007-12-26 11:52:21.000000000 +0100
@@ -298,6 +298,7 @@
       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 -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/abe-1.1/src/Game.c ./src/Game.c
--- ../orig/abe-1.1/src/Game.c	2005-03-05 17:20:04.000000000 +0100
+++ ./src/Game.c	2007-12-26 11:51:59.000000000 +0100
@@ -386,6 +386,7 @@
       game.keys++;
       break;
 #endif
+    case SDLK_KP_ENTER:
     case SDLK_RETURN:
       if(!game.end_game) {
         if(!game.balloonTimer && game.balloons) {
diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/abe-1.1/src/Icons.c ./src/Icons.c
--- ../orig/abe-1.1/src/Icons.c	2005-03-05 17:20:04.000000000 +0100
+++ ./src/Icons.c	2007-12-26 11:52:55.000000000 +0100
@@ -99,6 +99,7 @@
           icon_selection = -1;
           goto escape;
         case SDLK_SPACE:
+        case SDLK_KP_ENTER:
         case SDLK_RETURN:
           goto escape;
         case SDLK_LEFT:
diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/abe-1.1/src/Splash.c ./src/Splash.c
--- ../orig/abe-1.1/src/Splash.c	2005-03-05 17:20:04.000000000 +0100
+++ ./src/Splash.c	2007-12-26 11:52:38.000000000 +0100
@@ -40,6 +40,7 @@
       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;