mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
Merge pull request #2556 from heuripedes/master
(input_overlay) Fix unneeded load and memory leak
This commit is contained in:
commit
fd8bfc4b93
@ -549,6 +549,9 @@ static void input_overlay_loaded(void *task_data, void *user_data, const char *e
|
|||||||
goto abort_load;
|
goto abort_load;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!settings->input.overlay_enable)
|
||||||
|
goto abort_load;
|
||||||
|
|
||||||
if (!video_driver_overlay_interface(&iface) || !iface)
|
if (!video_driver_overlay_interface(&iface) || !iface)
|
||||||
{
|
{
|
||||||
RARCH_ERR("Overlay interface is not present in video driver.\n");
|
RARCH_ERR("Overlay interface is not present in video driver.\n");
|
||||||
@ -586,6 +589,8 @@ abort_load:
|
|||||||
void input_overlay_init(void)
|
void input_overlay_init(void)
|
||||||
{
|
{
|
||||||
input_overlay_free();
|
input_overlay_free();
|
||||||
|
|
||||||
|
if (config_get_ptr()->input.overlay_enable)
|
||||||
rarch_task_push_overlay_load_default(input_overlay_loaded, NULL);
|
rarch_task_push_overlay_load_default(input_overlay_loaded, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user