Added window resize functionality

This commit is contained in:
CobaltXII
2018-12-30 21:03:31 -05:00
parent 8d27b6f6cf
commit 3a409326be

View File

@@ -38,7 +38,7 @@ int main(int argc, char** argv)
sdl_x_res,
sdl_y_res,
SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_OPENGL
SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_OPENGL
);
// Make sure the SDL_Window* was created successfully.
@@ -216,6 +216,10 @@ int main(int argc, char** argv)
auto frame_start_time = std::chrono::high_resolution_clock::now();
// Get the size of the sdl_window*, in case it was resized.
SDL_GetWindowSize(sdl_window, &sdl_x_res, &sdl_y_res);
// Poll events.
SDL_Event e;