diff options
Diffstat (limited to 'src/win')
-rw-r--r-- | src/win/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/win/debug_logger.hpp | 2 | ||||
-rw-r--r-- | src/win/graph/direct/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/win/native/god_window.cpp | 3 | ||||
-rw-r--r-- | src/win/native/window.cpp | 11 |
5 files changed, 14 insertions, 6 deletions
diff --git a/src/win/CMakeLists.txt b/src/win/CMakeLists.txt index 5727e4c0..696ef200 100644 --- a/src/win/CMakeLists.txt +++ b/src/win/CMakeLists.txt @@ -13,7 +13,6 @@ target_sources(cru_win_base PUBLIC ${CRU_WIN_BASE_INCLUDE_DIR}/win_pre_config.hpp ) target_compile_definitions(cru_win_base PUBLIC UNICODE _UNICODE) # use unicode -target_include_directories(cru_win_base PUBLIC .) target_link_libraries(cru_win_base PUBLIC cru_base) add_subdirectory(graph) diff --git a/src/win/debug_logger.hpp b/src/win/debug_logger.hpp index c5321828..b6694279 100644 --- a/src/win/debug_logger.hpp +++ b/src/win/debug_logger.hpp @@ -15,6 +15,8 @@ class WinDebugLoggerSource : public ::cru::log::ILogSource { ~WinDebugLoggerSource() = default; void Write(::cru::log::LogLevel level, const std::string_view& s) override { + CRU_UNUSED(level) + const std::wstring&& ws = ToUtf16String(s); ::OutputDebugStringW(ws.data()); } diff --git a/src/win/graph/direct/CMakeLists.txt b/src/win/graph/direct/CMakeLists.txt index b277fa32..492f6749 100644 --- a/src/win/graph/direct/CMakeLists.txt +++ b/src/win/graph/direct/CMakeLists.txt @@ -21,4 +21,5 @@ target_sources(cru_win_graph_direct PUBLIC ${CRU_WIN_GRAPH_DIRECT_INCLUDE_DIR}/resource.hpp ${CRU_WIN_GRAPH_DIRECT_INCLUDE_DIR}/text_layout.hpp ) -target_link_libraries(cru_win_graph_direct PUBLIC D3D11 D2d1 DWrite cru_win_base cru_platform_graph) +target_link_libraries(cru_win_graph_direct PUBLIC D3D11 D2d1 DWrite) +target_link_libraries(cru_win_graph_direct PUBLIC cru_win_base cru_platform_graph) diff --git a/src/win/native/god_window.cpp b/src/win/native/god_window.cpp index be54f698..00577002 100644 --- a/src/win/native/god_window.cpp +++ b/src/win/native/god_window.cpp @@ -51,6 +51,9 @@ GodWindow::~GodWindow() { bool GodWindow::HandleGodWindowMessage(HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param, LRESULT* result) { + CRU_UNUSED(hwnd) + CRU_UNUSED(l_param) + switch (msg) { case invoke_later_message_id: { const auto p_action = reinterpret_cast<std::function<void()>*>(w_param); diff --git a/src/win/native/window.cpp b/src/win/native/window.cpp index 6fd94838..f996af02 100644 --- a/src/win/native/window.cpp +++ b/src/win/native/window.cpp @@ -33,8 +33,8 @@ WinNativeWindow::WinNativeWindow(WinUiApplication* application, const auto window_manager = application->GetWindowManager(); hwnd_ = CreateWindowExW( - 0, window_manager->GetGeneralWindowClass()->GetName(), L"", window_style, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + 0, window_class->GetName(), L"", window_style, CW_USEDEFAULT, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, parent == nullptr ? nullptr : parent->GetWindowHandle(), nullptr, application->GetInstanceHandle(), nullptr); @@ -419,7 +419,10 @@ void WinNativeWindow::OnMouseUpInternal(platform::native::MouseButton button, mouse_up_event_.Raise({button, dip_point}); } -void WinNativeWindow::OnMouseWheelInternal(short delta, POINT point) {} +void WinNativeWindow::OnMouseWheelInternal(short delta, POINT point) { + CRU_UNUSED(delta) + CRU_UNUSED(point) +} void WinNativeWindow::OnKeyDownInternal(int virtual_code) { key_down_event_.Raise(virtual_code); @@ -429,7 +432,7 @@ void WinNativeWindow::OnKeyUpInternal(int virtual_code) { key_up_event_.Raise(virtual_code); } -void WinNativeWindow::OnCharInternal(wchar_t c) {} +void WinNativeWindow::OnCharInternal(wchar_t c) { CRU_UNUSED(c) } void WinNativeWindow::OnActivatedInternal() {} |