Kernel/armv7 - Set ARMv7 to use the initrd for /Acess
[tpg/acess2.git] / AcessNative / acesskernel_src / ui_sdl.c
index 3f3cb13..11033d9 100644 (file)
@@ -7,7 +7,7 @@
 #define const
 #include "ui.h"
 #undef const
-#include <tpl_drv_keyboard.h>
+#include <api_drv_keyboard.h>
 
 // === IMPORTS ===
 extern void    AcessNative_Exit(void);
@@ -57,6 +57,10 @@ Uint32 UI_GetAcessKeyFromSDL(SDLKey Sym, Uint16 Unicode)
        // Fast return
        if( gUI_Keymap[shiftState][Sym] )
                return gUI_Keymap[shiftState][Sym];
+
+       // Enter key on acess returns \n, but SDL returns \r
+       if( Sym == SDLK_RETURN )
+               Unicode = '\n';
        
        // How nice of you, a unicode value
        if( Unicode )
@@ -85,6 +89,7 @@ Uint32 UI_GetAcessKeyFromSDL(SDLKey Sym, Uint16 Unicode)
                case SDLK_F10:  ret = KEY_F10;  break;
                case SDLK_F11:  ret = KEY_F11;  break;
                case SDLK_F12:  ret = KEY_F12;  break;
+               case SDLK_RETURN:       ret = '\n';     break;
                default:
                        printf("Unhandled key code %i\n", Sym);
                        break;

UCC git Repository :: git.ucc.asn.au