Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
AfxSdlApp: Extract recreateWindow()
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffeine committed Apr 24, 2023
1 parent a566878 commit 17b72dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libdev/afx/AfxSdlApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ bool AfxSdlApp::OSStartup()
spdlog::info("Initializing SDL...");
SDL_Init(SDL_INIT_VIDEO);

return recreateWindow();
}

bool AfxSdlApp::recreateWindow()
{
if (pWindow_)
SDL_DestroyWindow(pWindow_);

{
bool doubleBuffer = true;
int buffers = configuration_.getConfig().multisampleBuffers;
Expand Down
1 change: 1 addition & 0 deletions src/libdev/afx/AfxSdlApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class AfxSdlApp : public AfxApp

~AfxSdlApp() override = default;

bool recreateWindow();
SDL_Window* window() { return pWindow_; }

void finish() override;
Expand Down

0 comments on commit 17b72dd

Please sign in to comment.