mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
(input_overlay.c) Cleanup
This commit is contained in:
parent
fd7e2cd394
commit
160ac49089
@ -519,9 +519,9 @@ void input_overlay_free(void)
|
|||||||
static void input_overlay_loaded(void *task_data, void *user_data, const char *err)
|
static void input_overlay_loaded(void *task_data, void *user_data, const char *err)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
input_overlay_t *ol;
|
overlay_task_data_t *data = (overlay_task_data_t*)task_data;
|
||||||
overlay_task_data_t *data = (overlay_task_data_t*)task_data;
|
settings_t *settings = config_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
input_overlay_t *ol = NULL;
|
||||||
const video_overlay_interface_t *iface = NULL;
|
const video_overlay_interface_t *iface = NULL;
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
@ -545,17 +545,20 @@ static void input_overlay_loaded(void *task_data, void *user_data, const char *e
|
|||||||
goto abort_load;
|
goto abort_load;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol = (input_overlay_t*)calloc(1, sizeof(*ol));
|
ol = (input_overlay_t*)calloc(1, sizeof(*ol));
|
||||||
ol->overlays = data->overlays;
|
ol->overlays = data->overlays;
|
||||||
ol->size = data->size;
|
ol->size = data->size;
|
||||||
ol->active = data->active;
|
ol->active = data->active;
|
||||||
ol->iface = iface;
|
ol->iface = iface;
|
||||||
ol->iface_data = video_driver_get_ptr(true);
|
ol->iface_data = video_driver_get_ptr(true);
|
||||||
|
|
||||||
overlay_ptr = ol;
|
overlay_ptr = ol;
|
||||||
|
|
||||||
input_overlay_load_active(settings->input.overlay_opacity);
|
input_overlay_load_active(settings->input.overlay_opacity);
|
||||||
input_overlay_enable(input_driver_is_onscreen_keyboard_enabled() ? settings->osk.enable : settings->input.overlay_enable);
|
if (input_driver_is_onscreen_keyboard_enabled())
|
||||||
|
input_overlay_enable(settings->osk.enable);
|
||||||
|
else
|
||||||
|
input_overlay_enable(settings->input.overlay_enable);
|
||||||
input_overlay_set_scale_factor(settings->input.overlay_scale);
|
input_overlay_set_scale_factor(settings->input.overlay_scale);
|
||||||
|
|
||||||
ol->next_index = (ol->index + 1) % ol->size;
|
ol->next_index = (ol->index + 1) % ol->size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user