Rename variable to better reflect its purpose

This commit is contained in:
Scr3amer 2023-04-01 17:01:13 -04:00
parent 7cd353f3af
commit f1ee946007

View File

@ -429,12 +429,12 @@ static BOOL CALLBACK monitorCallback(HMONITOR handle,
if (wcscmp(mi.szDevice, monitor->win32.adapterName) == 0)
{
monitor->win32.handle = handle;
char *possibleBetterDisplayName = GetAccurateMonitorName(mi.szDevice);
if(possibleBetterDisplayName != NULL)
char *possiblyMoreAccurateMonitorName = GetAccurateMonitorName(mi.szDevice);
if(possiblyMoreAccurateMonitorName != NULL)
{
strncpy(monitor->name, possibleBetterDisplayName, sizeof(monitor->name) - 1);
free(possibleBetterDisplayName);
possibleBetterDisplayName = NULL;
strncpy(monitor->name, possiblyMoreAccurateMonitorName, sizeof(monitor->name) - 1);
free(possiblyMoreAccurateMonitorName);
possiblyMoreAccurateMonitorName = NULL;
}
}
}