From e8589550140d20b675fa7736441d7cdd1daee4d7 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 20 Nov 2018 21:02:49 +0800 Subject: Add clip to padding. --- src/application.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index fa71c37e..c3669f72 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -86,16 +86,6 @@ namespace cru { return instance_; } - namespace - { - void LoadSystemCursor(HINSTANCE h_instance) - { - ui::cursors::arrow = std::make_shared(::LoadCursorW(nullptr, IDC_ARROW), false); - ui::cursors::hand = std::make_shared(::LoadCursorW(nullptr, IDC_HAND), false); - ui::cursors::i_beam = std::make_shared(::LoadCursorW(nullptr, IDC_IBEAM), false); - } - } - Application::Application(HINSTANCE h_instance) : h_instance_(h_instance) { @@ -104,9 +94,12 @@ namespace cru { instance_ = this; + if (!::IsWindows8OrGreater()) + throw std::runtime_error("Must run on Windows 8 or later."); + god_window_ = std::make_unique(this); - LoadSystemCursor(h_instance); + ui::cursors::LoadSystemCursors(); } Application::~Application() -- cgit v1.2.3