mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed animated cursor issue
This commit is contained in:
parent
f9c30e4c83
commit
216d58da31
@ -86,29 +86,30 @@ void CMouse::ReadOptions(CConfigParser& parser, const WCHAR* section, CMeterWind
|
|||||||
}
|
}
|
||||||
else if (wcschr(mouseCursor, L'.'))
|
else if (wcschr(mouseCursor, L'.'))
|
||||||
{
|
{
|
||||||
// Load custom cursor
|
m_CursorType = MOUSECURSOR_CUSTOM;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Inherit from [Rainmeter].
|
||||||
|
m_CursorType = meterWindow->GetMouse().m_CursorType;
|
||||||
|
if (m_CursorType == MOUSECURSOR_CUSTOM)
|
||||||
|
{
|
||||||
|
mouseCursor = meterWindow->GetParser().ReadString(L"Rainmeter", L"MouseActionCursor", L"").c_str();;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_CursorType == MOUSECURSOR_CUSTOM)
|
||||||
|
{
|
||||||
std::wstring cursorPath = meterWindow->GetResourcesPath();
|
std::wstring cursorPath = meterWindow->GetResourcesPath();
|
||||||
cursorPath += L"Cursors\\";
|
cursorPath += L"Cursors\\";
|
||||||
cursorPath += mouseCursor;
|
cursorPath += mouseCursor;
|
||||||
m_CustomCursor = LoadCursorFromFile(cursorPath.c_str());
|
m_CustomCursor = LoadCursorFromFile(cursorPath.c_str());
|
||||||
if (m_CustomCursor)
|
if (!m_CustomCursor)
|
||||||
{
|
|
||||||
m_CursorType = MOUSECURSOR_CUSTOM;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_CursorType = MOUSECURSOR_ARROW;
|
m_CursorType = MOUSECURSOR_ARROW;
|
||||||
LogWithArgs(LOG_ERROR, L"Invalid cursor: %s", cursorPath.c_str());
|
LogWithArgs(LOG_ERROR, L"Invalid cursor: %s", cursorPath.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
m_CursorType = meterWindow->GetMouse().m_CursorType;
|
|
||||||
if (meterWindow->GetMouse().m_CustomCursor)
|
|
||||||
{
|
|
||||||
m_CustomCursor = CopyCursor(meterWindow->GetMouse().m_CustomCursor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HCURSOR CMouse::GetCursor() const
|
HCURSOR CMouse::GetCursor() const
|
||||||
|
Loading…
Reference in New Issue
Block a user