diff options
author | crupest <crupest@outlook.com> | 2019-05-24 23:45:58 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-05-24 23:45:58 +0800 |
commit | b6db663269201fa14a6a4aa1b9042645a9e8f859 (patch) | |
tree | 1984e2c2784fb9623d4c20fbdd6fc650792e133c /src/win/native/win_application.cpp | |
parent | b9df1bcaea0c19b2e29479cdb1ad5a39e23c4ee7 (diff) | |
download | cru-b6db663269201fa14a6a4aa1b9042645a9e8f859.tar.gz cru-b6db663269201fa14a6a4aa1b9042645a9e8f859.tar.bz2 cru-b6db663269201fa14a6a4aa1b9042645a9e8f859.zip |
...
Diffstat (limited to 'src/win/native/win_application.cpp')
-rw-r--r-- | src/win/native/win_application.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/win/native/win_application.cpp b/src/win/native/win_application.cpp index 6c39453f..00a16ff1 100644 --- a/src/win/native/win_application.cpp +++ b/src/win/native/win_application.cpp @@ -1,7 +1,7 @@ #include "cru/win/native/win_application.hpp" #include "cru/win/exception.hpp" -#include "cru/win/graph/graph_manager.hpp" +#include "cru/win/graph/win_graph_factory.hpp" #include "cru/win/native/god_window.hpp" #include "cru/win/native/win_native_window.hpp" #include "god_window_message.hpp" @@ -38,13 +38,14 @@ WinApplication::WinApplication(HINSTANCE h_instance) : h_instance_(h_instance) { if (!::IsWindows8OrGreater()) throw std::runtime_error("Must run on Windows 8 or later."); + graph::WinGraphFactory::CreateInstance(); + god_window_ = std::make_shared<GodWindow>(this); timer_manager_ = std::make_shared<TimerManager>(god_window_.get()); window_manager_ = std::make_shared<WindowManager>(this); } -WinApplication::~WinApplication() { - instance = nullptr; } +WinApplication::~WinApplication() { instance = nullptr; } int WinApplication::Run() { MSG msg; @@ -55,7 +56,7 @@ int WinApplication::Run() { for (const auto& handler : quit_handlers_) handler(); - delete graph::GraphManager::GetInstance(); + delete graph::WinGraphFactory::GetInstance(); delete this; return static_cast<int>(msg.wParam); |