diff options
author | 杨宇千 <crupest@outlook.com> | 2019-09-08 22:24:28 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-09-08 22:24:28 +0800 |
commit | a8ba16ddab3291e59a33b36405462094f8cdf5bc (patch) | |
tree | aa849cdc1f9b4f7a0aa150f562b2e618c63ecceb /src/win/native/cursor.cpp | |
parent | 8b9a306d6f24dbc08aeee16b115260406e79126d (diff) | |
download | cru-a8ba16ddab3291e59a33b36405462094f8cdf5bc.tar.gz cru-a8ba16ddab3291e59a33b36405462094f8cdf5bc.tar.bz2 cru-a8ba16ddab3291e59a33b36405462094f8cdf5bc.zip |
...
Diffstat (limited to 'src/win/native/cursor.cpp')
-rw-r--r-- | src/win/native/cursor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/win/native/cursor.cpp b/src/win/native/cursor.cpp index 8c0e393b..a0f9dd6c 100644 --- a/src/win/native/cursor.cpp +++ b/src/win/native/cursor.cpp @@ -1,7 +1,7 @@ #include "cru/win/native/cursor.hpp" #include "cru/common/format.hpp" -#include "cru/platform/debug.hpp" +#include "cru/common/logger.hpp" #include "cru/win/native/exception.hpp" #include <stdexcept> @@ -15,17 +15,17 @@ WinCursor::WinCursor(HCURSOR handle, bool auto_delete) { WinCursor::~WinCursor() { if (auto_delete_) { if (!::DestroyCursor(handle_)) { - DebugMessage( - util::Format(L"Failed to destroy a cursor. Last error code: {}", - ::GetLastError())); // This is not a fetal error but - // might still need notice. + // This is not a fetal error but might still need notice. + log::Warn(L"Failed to destroy a cursor. Last error code: {}", + ::GetLastError()); } } } namespace { WinCursor* LoadWinCursor(const wchar_t* name) { - const auto handle = static_cast<HCURSOR>(::LoadImageW(NULL, name, IMAGE_CURSOR, SM_CYCURSOR, SM_CYCURSOR, LR_SHARED)); + const auto handle = static_cast<HCURSOR>(::LoadImageW( + NULL, name, IMAGE_CURSOR, SM_CYCURSOR, SM_CYCURSOR, LR_SHARED)); if (handle == NULL) { throw Win32Error(::GetLastError(), "Failed to get system cursor."); } |