aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2019-06-11 18:06:44 +0200
committerAndre Weissflog <floooh@gmail.com>2019-06-11 18:06:44 +0200
commit393a1aa8b0605dfd070f2f3b4e32973f6ebc9efa (patch)
treedff6e24a521494306f8b8df53a0360dfe37864d9
parentd9a806a371d582f0bf58bd478e1df43cfbbebb53 (diff)
sokol_app.h windows: minor code cleanup
-rw-r--r--sokol_app.h10
1 files 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;
}
}