mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
Create input_driver_init
This commit is contained in:
parent
b21c3c460a
commit
95664b038e
@ -372,7 +372,7 @@ static void init_video_input(const input_driver_t *tmp)
|
||||
rarch_fail(1, "init_video_input()");
|
||||
}
|
||||
|
||||
driver->input_data = driver->input->init();
|
||||
driver->input_data = input_driver_init();
|
||||
|
||||
if (driver->input_data)
|
||||
return;
|
||||
|
@ -272,3 +272,14 @@ bool input_driver_grab_mouse(bool state)
|
||||
driver->input->grab_mouse(driver->input_data, state);
|
||||
return true;
|
||||
}
|
||||
|
||||
void *input_driver_init(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
if (!driver)
|
||||
return NULL;
|
||||
if (!driver->input)
|
||||
return NULL;
|
||||
return driver->input->init();
|
||||
}
|
||||
|
@ -150,6 +150,8 @@ const rarch_joypad_driver_t * input_driver_get_joypad_driver(void);
|
||||
|
||||
bool input_driver_grab_mouse(bool state);
|
||||
|
||||
void *input_driver_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user