From 393a1aa8b0605dfd070f2f3b4e32973f6ebc9efa Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Tue, 11 Jun 2019 18:06:44 +0200 Subject: sokol_app.h windows: minor code cleanup --- sokol_app.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sokol_app.h b/sokol_app.h index 98625b3c..9fc98424 100644 --- a/sokol_app.h +++ b/sokol_app.h @@ -3911,13 +3911,8 @@ _SOKOL_PRIVATE void _sapp_win32_init_keytable(void) { _SOKOL_PRIVATE bool _sapp_win32_update_dimensions(void) { RECT rect; if (GetClientRect(_sapp_win32_hwnd, &rect)) { - const int cur_width = (int)((float)(rect.right - rect.left) / _sapp_win32_window_scale); - const int cur_height = (int)((float)(rect.bottom - rect.top) / _sapp_win32_window_scale); - if ((cur_width != _sapp.window_width) || (cur_height != _sapp.window_height)) { - _sapp.window_width = cur_width; - _sapp.window_height = cur_height; - } - + _sapp.window_width = = (int)((float)(rect.right - rect.left) / _sapp_win32_window_scale); + _sapp.window_height = (int)((float)(rect.bottom - rect.top) / _sapp_win32_window_scale); const int fb_width = (int)((float)_sapp.window_width * _sapp_win32_content_scale); const int fb_height = (int)((float)_sapp.window_height * _sapp_win32_content_scale); if ((fb_width != _sapp.framebuffer_width) || (fb_height != _sapp.framebuffer_height)) { @@ -3930,7 +3925,6 @@ _SOKOL_PRIVATE bool _sapp_win32_update_dimensions(void) { if (_sapp.framebuffer_height == 0) { _sapp.framebuffer_height = 1; } - return true; } } -- cgit v1.2.3