Added window resize functionality
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user