mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed a potential crash in SCREEN_WIDTH & SCREEN_HEIGHT when not passing a SysInfoData.
This commit is contained in:
parent
e6feb42d2e
commit
9b30effafd
@ -445,12 +445,12 @@ double Update2(UINT id)
|
||||
if (data)
|
||||
return m_Monitors.m_MonitorInfo[data-1].rcMonitor.right-m_Monitors.m_MonitorInfo[data-1].rcMonitor.left;
|
||||
else
|
||||
GetSystemMetrics(SM_CXSCREEN);
|
||||
return GetSystemMetrics(SM_CXSCREEN);
|
||||
case SCREEN_HEIGHT:
|
||||
if (data)
|
||||
return m_Monitors.m_MonitorInfo[data-1].rcMonitor.bottom-m_Monitors.m_MonitorInfo[data-1].rcMonitor.top;
|
||||
else
|
||||
GetSystemMetrics(SM_CYSCREEN);
|
||||
return GetSystemMetrics(SM_CYSCREEN);
|
||||
case VIRTUAL_SCREEN_WIDTH:
|
||||
return GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
||||
case VIRTUAL_SCREEN_HEIGHT:
|
||||
|
Loading…
Reference in New Issue
Block a user