From 22e03ce83ae740c09912cf8acd5307a67c59471d Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Tue, 3 Jan 2017 09:35:16 +0200 Subject: [PATCH] using SDL_WINDOWEVENT_SIZE_CHANGED for tracking window size changes, instead of SDL_WINDOWEVENT_RESIZED, which is only sent when the window is resized extrnally (by the user). --- src/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index eff77a5..169dbd3 100644 --- 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; -- 1.7.10.4