Remove nasty input overlay hack for input_overlay_set_scale_factor

This commit is contained in:
twinaphex 2016-11-27 15:10:09 +01:00
parent e9846aae68
commit bbb2ffea9c
3 changed files with 5 additions and 5 deletions

View File

@ -2184,7 +2184,7 @@ bool command_event(enum event_command cmd, void *data)
break;
case CMD_EVENT_OVERLAY_SET_SCALE_FACTOR:
#ifdef HAVE_OVERLAY
input_overlay_set_scale_factor(NULL, settings->input.overlay_scale);
input_overlay_set_scale_factor(overlay_ptr, settings->input.overlay_scale);
#endif
break;
case CMD_EVENT_OVERLAY_SET_ALPHA_MOD:

View File

@ -74,7 +74,7 @@ struct input_overlay
enum overlay_status state;
};
static input_overlay_t *overlay_ptr = NULL;
input_overlay_t *overlay_ptr = NULL;
/**
* input_overlay_scale:
@ -150,9 +150,6 @@ void input_overlay_set_scale_factor(input_overlay_t *ol, float scale)
{
size_t i;
/* TODO/FIXME - Bad hackery. Should get rid of this */
if (!ol)
ol = overlay_ptr;
if (!ol)
return;

View File

@ -244,6 +244,9 @@ bool input_overlay_is_alive(input_overlay_t *ol);
void input_overlay_loaded(void *task_data, void *user_data, const char *err);
/* FIXME - temporary. Globals are bad */
extern input_overlay_t *overlay_ptr;
RETRO_END_DECLS
#endif