Simplify task_push_overlay_load_default

This commit is contained in:
twinaphex 2016-09-29 11:46:37 +02:00
parent d79c28f13b
commit dc915713dd

View File

@ -785,19 +785,11 @@ bool task_push_overlay_load_default(
{
settings_t *settings = config_get_ptr();
bool osk_enable = input_driver_is_onscreen_keyboard_enabled();
const char *path = osk_enable ? settings->path.osk_overlay :
settings->path.overlay;
if (osk_enable)
{
if (!*settings->path.osk_overlay)
return false;
}
else
{
if (!*settings->path.overlay)
return false;
}
if (string_is_empty(path))
return false;
return task_push_overlay_load(
osk_enable ? settings->path.osk_overlay : settings->path.overlay,
cb, user_data);
return task_push_overlay_load(path, cb, user_data);
}