Fixed the shim.

This commit is contained in:
OBattler
2021-09-03 19:35:25 +02:00
parent 85a9aa4904
commit b1c985c14c

View File

@@ -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