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
@ -85,30 +85,31 @@ void CMouse::ReadOptions(CConfigParser& parser, const WCHAR* section, CMeterWind
|
|||||||
m_CursorType = MOUSECURSOR_PEN;
|
m_CursorType = MOUSECURSOR_PEN;
|
||||||
}
|
}
|
||||||
else if (wcschr(mouseCursor, L'.'))
|
else if (wcschr(mouseCursor, L'.'))
|
||||||
{
|
|
||||||
// Load custom cursor
|
|
||||||
std::wstring cursorPath = meterWindow->GetResourcesPath();
|
|
||||||
cursorPath += L"Cursors\\";
|
|
||||||
cursorPath += mouseCursor;
|
|
||||||
m_CustomCursor = LoadCursorFromFile(cursorPath.c_str());
|
|
||||||
if (m_CustomCursor)
|
|
||||||
{
|
{
|
||||||
m_CursorType = MOUSECURSOR_CUSTOM;
|
m_CursorType = MOUSECURSOR_CUSTOM;
|
||||||
}
|
}
|
||||||
else
|
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();
|
||||||
|
cursorPath += L"Cursors\\";
|
||||||
|
cursorPath += mouseCursor;
|
||||||
|
m_CustomCursor = LoadCursorFromFile(cursorPath.c_str());
|
||||||
|
if (!m_CustomCursor)
|
||||||
{
|
{
|
||||||
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