mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 01:38:12 +00:00
Create RARCH_INPUT_CTL_DESTROY
This commit is contained in:
parent
73ce9c0d23
commit
9643edfac7
2
driver.c
2
driver.c
@ -467,6 +467,6 @@ void uninit_drivers(int flags)
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_DEINIT, NULL);
|
||||
|
||||
if ((flags & DRIVER_INPUT) && !driver->input_data_own)
|
||||
input_driver_destroy();
|
||||
input_driver_ctl(RARCH_INPUT_CTL_DESTROY, NULL);
|
||||
}
|
||||
|
||||
|
@ -208,14 +208,6 @@ void input_driver_set(const input_driver_t **input, void **input_data)
|
||||
driver->input_data_own = true;
|
||||
}
|
||||
|
||||
void input_driver_destroy(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
if (driver)
|
||||
driver->input_data = NULL;
|
||||
}
|
||||
|
||||
void input_driver_keyboard_mapping_set_block(bool value)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
@ -277,6 +269,11 @@ bool input_driver_ctl(enum rarch_input_ctl_state state, void *data)
|
||||
return false;
|
||||
driver->input->free(driver->input_data);
|
||||
return true;
|
||||
case RARCH_INPUT_CTL_DESTROY:
|
||||
if (!driver)
|
||||
return false;
|
||||
driver->input_data = NULL;
|
||||
return true;
|
||||
case RARCH_INPUT_CTL_GRAB_STDIN:
|
||||
if (input->grab_stdin)
|
||||
return input->grab_stdin(driver->input_data);
|
||||
|
@ -51,6 +51,7 @@ enum rarch_input_ctl_state
|
||||
RARCH_INPUT_CTL_NONE = 0,
|
||||
RARCH_INPUT_CTL_INIT,
|
||||
RARCH_INPUT_CTL_DEINIT,
|
||||
RARCH_INPUT_CTL_DESTROY,
|
||||
RARCH_INPUT_CTL_FIND_DRIVER,
|
||||
RARCH_INPUT_CTL_GRAB_STDIN,
|
||||
RARCH_INPUT_CTL_KB_MAPPING_IS_BLOCKED
|
||||
@ -171,8 +172,6 @@ const input_device_driver_t * input_driver_get_sec_joypad_driver(void);
|
||||
|
||||
bool input_driver_grab_mouse(bool state);
|
||||
|
||||
void input_driver_destroy(void);
|
||||
|
||||
void input_driver_keyboard_mapping_set_block(bool value);
|
||||
|
||||
const input_driver_t *input_get_ptr(void *data);
|
||||
|
Loading…
Reference in New Issue
Block a user