From: John Tsiombikas Date: Tue, 3 Jan 2017 07:35:16 +0000 (+0200) Subject: using SDL_WINDOWEVENT_SIZE_CHANGED for tracking window size changes, X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=commitdiff_plain;h=22e03ce83ae740c09912cf8acd5307a67c59471d 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). --- 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;