From f33d9f4f68f0fca28d81a2c7f4f7d9f75786ba52 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 27 Jul 2020 21:18:33 +0200 Subject: [PATCH] sokol: sapp_macos_set_title --- thirdparty/sokol/sokol_app.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thirdparty/sokol/sokol_app.h b/thirdparty/sokol/sokol_app.h index 35f56171e9..b89148217c 100755 --- a/thirdparty/sokol/sokol_app.h +++ b/thirdparty/sokol/sokol_app.h @@ -846,6 +846,7 @@ SOKOL_API_DECL const void* sapp_metal_get_renderpass_descriptor(void); SOKOL_API_DECL const void* sapp_metal_get_drawable(void); /* macOS: get ARC-bridged pointer to macOS NSWindow */ SOKOL_API_DECL const void* sapp_macos_get_window(void); +SOKOL_API_DECL void sapp_macos_set_title(const char* title); /* iOS: get ARC-bridged pointer to iOS UIWindow */ SOKOL_API_DECL const void* sapp_ios_get_window(void); @@ -7527,6 +7528,12 @@ SOKOL_API_IMPL const void* sapp_macos_get_window(void) { #endif } +SOKOL_API_IMPL void sapp_macos_set_title(const char* title) { + #if defined(__APPLE__) && !TARGET_OS_IPHONE + [_sapp_macos_window_obj setTitle: [NSString stringWithUTF8String:title]]; + #endif +} + SOKOL_API_IMPL const void* sapp_ios_get_window(void) { #if defined(__APPLE__) && TARGET_OS_IPHONE const void* obj = (__bridge const void*) _sapp_ios_window_obj;