mirror of https://github.com/mgba-emu/mgba.git
Fix gamepad input
This commit is contained in:
parent
9ac58c6996
commit
2805cc5fea
|
@ -75,6 +75,7 @@ void GBAInputBindKey(struct GBAInputMap* map, uint32_t type, int key, enum GBAKe
|
||||||
map->maps[m].type = 0;
|
map->maps[m].type = 0;
|
||||||
map->maps[m].map = 0;
|
map->maps[m].map = 0;
|
||||||
}
|
}
|
||||||
|
map->numMaps *= 2;
|
||||||
impl = &map->maps[m];
|
impl = &map->maps[m];
|
||||||
impl->type = type;
|
impl->type = type;
|
||||||
impl->map = calloc(GBA_KEY_MAX, sizeof(enum GBAKey));
|
impl->map = calloc(GBA_KEY_MAX, sizeof(enum GBAKey));
|
||||||
|
|
|
@ -14,9 +14,6 @@
|
||||||
#define GUI_MOD KMOD_CTRL
|
#define GUI_MOD KMOD_CTRL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SDL_BINDING_KEY 0x53444C4B
|
|
||||||
#define SDL_BINDING_BUTTON 0x53444C42
|
|
||||||
|
|
||||||
bool GBASDLInitEvents(struct GBASDLEvents* context) {
|
bool GBASDLInitEvents(struct GBASDLEvents* context) {
|
||||||
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0) {
|
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
|
#define SDL_BINDING_KEY 0x53444C4B
|
||||||
|
#define SDL_BINDING_BUTTON 0x53444C42
|
||||||
|
|
||||||
struct GBAVideoSoftwareRenderer;
|
struct GBAVideoSoftwareRenderer;
|
||||||
|
|
||||||
struct GBASDLEvents {
|
struct GBASDLEvents {
|
||||||
|
|
Loading…
Reference in New Issue