From d8ea9e4969b699c2514316e56a55770084eddf09 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 19 Oct 2021 16:58:39 +0300 Subject: [PATCH] sokol: move _sapp_macos_resize_window --- thirdparty/sokol/sokol_app.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/thirdparty/sokol/sokol_app.h b/thirdparty/sokol/sokol_app.h index c865140a21..82676a8b5a 100644 --- a/thirdparty/sokol/sokol_app.h +++ b/thirdparty/sokol/sokol_app.h @@ -3032,6 +3032,14 @@ _SOKOL_PRIVATE void _sapp_macos_update_window_title(void) { [_sapp.macos.window setTitle: [NSString stringWithUTF8String:_sapp.window_title]]; } +_SOKOL_PRIVATE void _sapp_macos_resize_window(int width, height) { + [_sapp.macos.window setFrame:NSMakeRect(width, height, width, height) display:YES animate:YES]; + //NSRect frame = [window frame]; + //frame.size = ; + //[window setFrame: frame display: YES animate: NO]; +} + + _SOKOL_PRIVATE void _sapp_macos_update_mouse(NSEvent* event) { if (!_sapp.mouse.locked) { const NSPoint mouse_pos = event.locationInWindow; @@ -10983,14 +10991,6 @@ SOKOL_API_IMPL void sapp_set_window_title(const char* title) { #endif } -_SOKOL_PRIVATE void _sapp_macos_resize_window(int width, height) { - [_sapp.macos.window setFrame:NSMakeRect(width, height, width, height) display:YES animate:YES]; - //NSRect frame = [window frame]; -//frame.size = theSizeYouWant; -//[window setFrame: frame display: YES animate: whetherYouWantAnimation]; - -} - SOKOL_API_IMPL void sapp_resize_window(int width, height) { /* #if defined(_SAPP_MACOS)