diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index c6e1336219..9710eeaedb 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -56,9 +56,8 @@ static void apple_rarch_exited(void); static void rarch_enable_ui(void) { - bool boolean = true; - - ui_companion_set_foreground(true); + bool boolean = true; + uico_state_get_ptr()->flags |= UICO_ST_FLAG_IS_ON_FOREGROUND; retroarch_ctl(RARCH_CTL_SET_PAUSED, &boolean); retroarch_ctl(RARCH_CTL_SET_IDLE, &boolean); @@ -67,9 +66,8 @@ static void rarch_enable_ui(void) static void rarch_disable_ui(void) { - bool boolean = false; - - ui_companion_set_foreground(false); + bool boolean = false; + uico_state_get_ptr()->flags &= ~UICO_ST_FLAG_IS_ON_FOREGROUND; retroarch_ctl(RARCH_CTL_SET_PAUSED, &boolean); retroarch_ctl(RARCH_CTL_SET_IDLE, &boolean); diff --git a/ui/ui_companion_driver.c b/ui/ui_companion_driver.c index 6afc1b4383..392d85eb4e 100644 --- a/ui/ui_companion_driver.c +++ b/ui/ui_companion_driver.c @@ -67,18 +67,6 @@ uico_driver_state_t *uico_state_get_ptr(void) return &uico_driver_st; } -void ui_companion_set_foreground(unsigned enable) -{ - uico_driver_state_t *uico_st = &uico_driver_st; - if (uico_st) - { - if (enable) - uico_st->flags |= UICO_ST_FLAG_IS_ON_FOREGROUND; - else - uico_st->flags &= ~UICO_ST_FLAG_IS_ON_FOREGROUND; - } -} - uint8_t ui_companion_get_flags(void) { uico_driver_state_t *uico_st = &uico_driver_st; diff --git a/ui/ui_companion_driver.h b/ui/ui_companion_driver.h index 9ee0daf8ef..a00fc4f3bd 100644 --- a/ui/ui_companion_driver.h +++ b/ui/ui_companion_driver.h @@ -158,8 +158,6 @@ extern ui_msg_window_t ui_msg_window_win32; uint8_t ui_companion_get_flags(void); -void ui_companion_set_foreground(unsigned enable); - void ui_companion_event_command(enum event_command action); void ui_companion_driver_notify_refresh(void);