From b1c985c14c131cc8083fe2b8345dd1a59d773dab Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 3 Sep 2021 19:35:25 +0200 Subject: [PATCH] Fixed the shim. --- src/86box.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/86box.c b/src/86box.c index b8715d991..7c9d919d0 100644 --- a/src/86box.c +++ b/src/86box.c @@ -1089,6 +1089,15 @@ pc_close(thread_t *ptr) } +#ifdef __APPLE__ +static void _ui_window_title(void *s) +{ + ui_window_title((const char *) s); + free(s); +} +#endif + + void pc_run(void) { @@ -1119,7 +1128,7 @@ pc_run(void) swprintf(temp, sizeof_w(temp), mouse_msg[!!mouse_capture], fps); #ifdef __APPLE__ /* Needed due to modifying the UI on the non-main thread is a big no-no. */ - dispatch_async_f(dispatch_get_main_queue(), strdup(temp), _ui_window_title); + dispatch_async_f(dispatch_get_main_queue(), strdup((const char *) temp), _ui_window_title); #else ui_window_title(temp); #endif