From eb97e62afb66c8dddf9ff91afa98a26a2ebf8aa1 Mon Sep 17 00:00:00 2001 From: Cpasjuste Date: Wed, 14 Nov 2018 13:59:33 +0100 Subject: [PATCH] sdl2: simplify display mode enumeration --- sdl2/source/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdl2/source/main.cpp b/sdl2/source/main.cpp index 021449c..f0e542d 100644 --- a/sdl2/source/main.cpp +++ b/sdl2/source/main.cpp @@ -93,9 +93,7 @@ int main(int argc, char *argv[]) // list available display modes, for "educational purpose" mode_count = SDL_GetNumDisplayModes(0); for (int i = 0; i < mode_count; i++) { - SDL_DisplayMode mode; - SDL_GetDisplayMode(0, i, &mode); - modes[i] = mode; + SDL_GetDisplayMode(0, i, &modes[i]); } // open CONTROLLER_PLAYER_1 and CONTROLLER_PLAYER_2