projects
/
laserbrain_demo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fd661e
)
using SDL_WINDOWEVENT_SIZE_CHANGED for tracking window size changes,
author
John Tsiombikas
<nuclear@mutantstargoat.com>
Tue, 3 Jan 2017 07:35:16 +0000
(09:35 +0200)
committer
John Tsiombikas
<nuclear@mutantstargoat.com>
Tue, 3 Jan 2017 07:35:16 +0000
(09:35 +0200)
instead of SDL_WINDOWEVENT_RESIZED, which is only sent when the window
is resized extrnally (by the user).
src/main.cc
patch
|
blob
|
history
diff --git
a/src/main.cc
b/src/main.cc
index
eff77a5
..
169dbd3
100644
(file)
--- a/
src/main.cc
+++ b/
src/main.cc
@@
-191,7
+191,7
@@
static void process_event(SDL_Event *ev)
break;
case SDL_WINDOWEVENT:
- if(ev->window.event == SDL_WINDOWEVENT_RESIZED) {
+ if(ev->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
SDL_GL_GetDrawableSize(win, &win_width, &win_height);
win_aspect = (float)win_width / (float)win_height;
scale_factor = win_width / ev->window.data1;