aboutsummaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-10 15:53:32 +0800
committercrupest <crupest@outlook.com>2018-11-10 15:53:32 +0800
commit8d5a08e8d054e9504ca31e0bfbfff7a1018c23c0 (patch)
treefdd8ac836b266044de380fea26e8f5fc80a5d9d9 /src/application.cpp
parentac4b0f8d438e7a7c2ecd836af8332b5da1e035c9 (diff)
downloadcru-8d5a08e8d054e9504ca31e0bfbfff7a1018c23c0.tar.gz
cru-8d5a08e8d054e9504ca31e0bfbfff7a1018c23c0.tar.bz2
cru-8d5a08e8d054e9504ca31e0bfbfff7a1018c23c0.zip
Refactor predefine resources. Add check for dead recursion in singletons in debug mode.
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 672ee347..9a98854c 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -4,7 +4,7 @@
#include "timer.hpp"
#include "ui/window.hpp"
#include "ui/cursor.hpp"
-#include "ui/predefine.hpp"
+#include "ui/ui_manager.hpp"
namespace cru {
constexpr auto god_window_class_name = L"GodWindowClass";
@@ -89,17 +89,6 @@ namespace cru {
namespace
{
- CaretInfo GetSystemCaretInfo()
- {
- CaretInfo caret_info;
- caret_info.caret_blink_duration = std::chrono::milliseconds(::GetCaretBlinkTime());
- DWORD caret_width;
- if (!::SystemParametersInfoW(SPI_GETCARETWIDTH, 0 , &caret_width, 0))
- throw Win32Error(::GetLastError(), "Failed to get system caret width.");
- caret_info.half_caret_width = caret_width / 2.0f;
- return caret_info;
- }
-
void LoadSystemCursor(HINSTANCE h_instance)
{
ui::cursors::arrow = std::make_shared<ui::Cursor>(::LoadCursorW(nullptr, IDC_ARROW), false);
@@ -118,10 +107,6 @@ namespace cru {
god_window_ = std::make_unique<GodWindow>(this);
- ui::predefine::InitThemes(&predefine_resource_map_);
-
- caret_info_ = GetSystemCaretInfo();
-
LoadSystemCursor(h_instance);
}