aboutsummaryrefslogtreecommitdiff
path: root/frontend/plat_sdl.c
diff options
context:
space:
mode:
authornotaz2012-04-24 01:48:17 +0300
committernotaz2012-04-29 19:32:08 +0300
commitb07c18e8645a17be916266820ae564e0d320cc1a (patch)
treee5a2dfa3128b1294f86ed010258ede0c37e56bd0 /frontend/plat_sdl.c
parent7badc9353b9570fd1c67827cfb477cef07974ddb (diff)
downloadpcsx_rearmed-b07c18e8645a17be916266820ae564e0d320cc1a.tar.gz
pcsx_rearmed-b07c18e8645a17be916266820ae564e0d320cc1a.tar.bz2
pcsx_rearmed-b07c18e8645a17be916266820ae564e0d320cc1a.zip
frontend: input: pass default binds as argument
allows to get rid of some hacks
Diffstat (limited to 'frontend/plat_sdl.c')
-rw-r--r--frontend/plat_sdl.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/frontend/plat_sdl.c b/frontend/plat_sdl.c
index 015450d..19d7ac0 100644
--- a/frontend/plat_sdl.c
+++ b/frontend/plat_sdl.c
@@ -13,11 +13,27 @@
#include "common/input.h"
#include "common/in_sdl.h"
#include "common/menu.h"
+#include "plugin_lib.h"
+#include "main.h"
#include "plat.h"
#include "revision.h"
-// XXX
-struct in_default_bind in_evdev_defbinds[] = {
+static const struct in_default_bind in_sdl_defbinds[] = {
+ { SDLK_UP, IN_BINDTYPE_PLAYER12, DKEY_UP },
+ { SDLK_DOWN, IN_BINDTYPE_PLAYER12, DKEY_DOWN },
+ { SDLK_LEFT, IN_BINDTYPE_PLAYER12, DKEY_LEFT },
+ { SDLK_RIGHT, IN_BINDTYPE_PLAYER12, DKEY_RIGHT },
+ { SDLK_d, IN_BINDTYPE_PLAYER12, DKEY_TRIANGLE },
+ { SDLK_z, IN_BINDTYPE_PLAYER12, DKEY_CROSS },
+ { SDLK_x, IN_BINDTYPE_PLAYER12, DKEY_CIRCLE },
+ { SDLK_s, IN_BINDTYPE_PLAYER12, DKEY_SQUARE },
+ { SDLK_v, IN_BINDTYPE_PLAYER12, DKEY_START },
+ { SDLK_c, IN_BINDTYPE_PLAYER12, DKEY_SELECT },
+ { SDLK_w, IN_BINDTYPE_PLAYER12, DKEY_L1 },
+ { SDLK_r, IN_BINDTYPE_PLAYER12, DKEY_R1 },
+ { SDLK_e, IN_BINDTYPE_PLAYER12, DKEY_L2 },
+ { SDLK_t, IN_BINDTYPE_PLAYER12, DKEY_R2 },
+ { SDLK_ESCAPE, IN_BINDTYPE_EMU, SACTION_ENTER_MENU },
{ 0, 0, 0 }
};
@@ -62,7 +78,7 @@ void plat_init(void)
}
SDL_WM_SetCaption("PCSX-ReARMed " REV, NULL);
- in_sdl_init();
+ in_sdl_init(in_sdl_defbinds);
in_probe();
return;