From f9c30e4c8394961ddb13627e51a18a20de94aa8e Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Fri, 13 Jul 2012 21:06:41 +0300 Subject: [PATCH] Fixed regression in dcdee91 --- Library/Mouse.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Library/Mouse.cpp b/Library/Mouse.cpp index ae998f24..1357ced7 100644 --- a/Library/Mouse.cpp +++ b/Library/Mouse.cpp @@ -50,7 +50,10 @@ void CMouse::ReadOptions(CConfigParser& parser, const WCHAR* section, CMeterWind m_LeaveAction = parser.ReadString(section, L"MouseLeaveAction", L"", false); const WCHAR* mouseCursor = parser.ReadString(section, L"MouseActionCursor", L"").c_str(); - int mouseCursorInt = CConfigParser::ParseInt(mouseCursor, -1); // For backwards compatibility + + // For backwards compatibility + int mouseCursorInt = (*mouseCursor == L'(') ? CConfigParser::ParseInt(mouseCursor, 0) : -1; + if (mouseCursorInt == 1 || _wcsicmp(mouseCursor, L"HAND") == 0) { @@ -81,7 +84,7 @@ void CMouse::ReadOptions(CConfigParser& parser, const WCHAR* section, CMeterWind { m_CursorType = MOUSECURSOR_PEN; } - else if (*mouseCursor && wcschr(mouseCursor, L'.')) + else if (wcschr(mouseCursor, L'.')) { // Load custom cursor std::wstring cursorPath = meterWindow->GetResourcesPath();