mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Put input_jpyad_init_driver last in 'input' callback function
This commit is contained in:
parent
bf06d67a30
commit
b3744c3126
@ -524,7 +524,6 @@ static void *android_input_init(const char *joypad_driver)
|
||||
|
||||
android->pads_connected = 0;
|
||||
android->quick_tap_time = 0;
|
||||
android->joypad = input_joypad_init_driver(joypad_driver, android);
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_android);
|
||||
|
||||
@ -547,6 +546,8 @@ static void *android_input_init(const char *joypad_driver)
|
||||
|
||||
android_app->input_alive = true;
|
||||
|
||||
android->joypad = input_joypad_init_driver(joypad_driver, android);
|
||||
|
||||
return android;
|
||||
}
|
||||
|
||||
|
@ -182,12 +182,13 @@ static void *dinput_init(const char *joypad_driver)
|
||||
}
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_dinput);
|
||||
di->joypad = input_joypad_init_driver(joypad_driver, di);
|
||||
|
||||
#ifndef _XBOX
|
||||
win32_set_input_userdata(di);
|
||||
#endif
|
||||
|
||||
di->joypad = input_joypad_init_driver(joypad_driver, di);
|
||||
|
||||
return di;
|
||||
}
|
||||
|
||||
|
@ -145,12 +145,10 @@ static void* dos_input_init(const char *joypad_driver)
|
||||
if (!dos)
|
||||
return NULL;
|
||||
|
||||
dos_keyboard_free();
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_dos);
|
||||
|
||||
dos->joypad = input_joypad_init_driver(joypad_driver, dos);
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_dos);
|
||||
|
||||
return dos;
|
||||
}
|
||||
|
||||
|
@ -216,13 +216,14 @@ static void *gx_input_init(const char *joypad_driver)
|
||||
if (!gx)
|
||||
return NULL;
|
||||
|
||||
gx->joypad = input_joypad_init_driver(joypad_driver, gx);
|
||||
#ifdef HW_RVL
|
||||
/* Allocate at least 1 mouse at startup */
|
||||
gx->mouse_max = 1;
|
||||
gx->mouse = (gx_input_mouse_t*)calloc(
|
||||
gx->mouse_max, sizeof(gx_input_mouse_t));
|
||||
#endif
|
||||
|
||||
gx->joypad = input_joypad_init_driver(joypad_driver, gx);
|
||||
return gx;
|
||||
}
|
||||
|
||||
|
@ -66,11 +66,12 @@ static void *linuxraw_input_init(const char *joypad_driver)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
linuxraw->joypad = input_joypad_init_driver(joypad_driver, linuxraw);
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_linux);
|
||||
|
||||
linux_terminal_claim_stdin();
|
||||
|
||||
linuxraw->joypad = input_joypad_init_driver(joypad_driver, linuxraw);
|
||||
|
||||
return linuxraw;
|
||||
}
|
||||
|
||||
|
@ -169,14 +169,15 @@ static void* ps3_input_init(const char *joypad_driver)
|
||||
if (!ps3)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_MOUSE
|
||||
cellMouseInit(MAX_MICE);
|
||||
#endif
|
||||
|
||||
ps3->joypad = input_joypad_init_driver(joypad_driver, ps3);
|
||||
|
||||
if (ps3->joypad)
|
||||
ps3->joypad->init(ps3);
|
||||
|
||||
#ifdef HAVE_MOUSE
|
||||
cellMouseInit(MAX_MICE);
|
||||
#endif
|
||||
return ps3;
|
||||
}
|
||||
|
||||
|
@ -270,11 +270,6 @@ static void* ps3_input_init(const char *joypad_driver)
|
||||
if (!ps3)
|
||||
return NULL;
|
||||
|
||||
ps3->joypad = input_joypad_init_driver(joypad_driver, ps3);
|
||||
|
||||
if (ps3->joypad)
|
||||
ps3->joypad->init(ps3);
|
||||
|
||||
/* Keyboard */
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_psl1ght);
|
||||
@ -288,6 +283,11 @@ static void* ps3_input_init(const char *joypad_driver)
|
||||
ps3_connect_keyboard(ps3, i);
|
||||
}
|
||||
|
||||
ps3->joypad = input_joypad_init_driver(joypad_driver, ps3);
|
||||
|
||||
if (ps3->joypad)
|
||||
ps3->joypad->init(ps3);
|
||||
|
||||
return ps3;
|
||||
}
|
||||
|
||||
|
@ -819,24 +819,22 @@ static void switch_input_free_input(void *data)
|
||||
|
||||
static void* switch_input_init(const char *joypad_driver)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
unsigned int i;
|
||||
#endif
|
||||
switch_input_t *sw = (switch_input_t*) calloc(1, sizeof(*sw));
|
||||
if (!sw)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
hidInitialize();
|
||||
#endif
|
||||
|
||||
sw->joypad = input_joypad_init_driver(joypad_driver, sw);
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
/*
|
||||
Here we assume that the touch screen is always 1280x720
|
||||
Call me back when a Nintendo Switch XL is out
|
||||
*/
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_switch);
|
||||
unsigned int i;
|
||||
for (i = 0; i <= SWITCH_MAX_SCANCODE; i++)
|
||||
sw->keyboard_state[i] = false;
|
||||
|
||||
@ -860,6 +858,8 @@ static void* switch_input_init(const char *joypad_driver)
|
||||
sw->sixaxis_handles_count[i] = 0;
|
||||
#endif
|
||||
|
||||
sw->joypad = input_joypad_init_driver(joypad_driver, sw);
|
||||
|
||||
return sw;
|
||||
}
|
||||
|
||||
|
@ -1310,7 +1310,6 @@ static void *udev_input_init(const char *joypad_driver)
|
||||
if (!udev->num_devices)
|
||||
RARCH_WARN("[udev]: Couldn't open any keyboard, mouse or touchpad. Are permissions set correctly for /dev/input/event*?\n");
|
||||
|
||||
udev->joypad = input_joypad_init_driver(joypad_driver, udev);
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_linux);
|
||||
|
||||
#ifdef __linux__
|
||||
@ -1322,6 +1321,8 @@ static void *udev_input_init(const char *joypad_driver)
|
||||
RARCH_WARN("[udev]: Full-screen pointer won't be available.\n");
|
||||
#endif
|
||||
|
||||
udev->joypad = input_joypad_init_driver(joypad_driver, udev);
|
||||
|
||||
return udev;
|
||||
|
||||
error:
|
||||
|
@ -383,12 +383,13 @@ bool input_wl_init(void *data, const char *joypad_name)
|
||||
if (!wl)
|
||||
return false;
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_linux);
|
||||
|
||||
wl->joypad = input_joypad_init_driver(joypad_name, wl);
|
||||
|
||||
if (!wl->joypad)
|
||||
return false;
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_linux);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -177,14 +177,14 @@ static void* wiiu_input_init(const char *joypad_driver)
|
||||
if (!wiiu)
|
||||
return NULL;
|
||||
|
||||
DEBUG_STR(joypad_driver);
|
||||
wiiu->joypad = input_joypad_init_driver(joypad_driver, wiiu);
|
||||
|
||||
KBDSetup(&kb_connection_callback,
|
||||
&kb_disconnection_callback,&kb_key_callback);
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_wiiu);
|
||||
|
||||
DEBUG_STR(joypad_driver);
|
||||
wiiu->joypad = input_joypad_init_driver(joypad_driver, wiiu);
|
||||
|
||||
return wiiu;
|
||||
}
|
||||
|
||||
|
@ -64,9 +64,10 @@ static void *x_input_init(const char *joypad_driver)
|
||||
x11->display = (Display*)video_driver_display_get();
|
||||
x11->win = (Window)video_driver_window_get();
|
||||
|
||||
x11->joypad = input_joypad_init_driver(joypad_driver, x11);
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_x11);
|
||||
|
||||
x11->joypad = input_joypad_init_driver(joypad_driver, x11);
|
||||
|
||||
return x11;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user