Bugfix: Fix skipping monitor handle assignation when monitor name was not generic

Found the issue why fullscreen was not working
This commit is contained in:
Scr3amer 2023-09-04 02:59:40 -04:00 committed by GitHub
parent 71dfe1fc45
commit 99ed2a3d22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -202,11 +202,12 @@ static BOOL CALLBACK monitorCallback(HMONITOR handle,
if (wcscmp(mi.szDevice, monitor->win32.adapterName) != 0) if (wcscmp(mi.szDevice, monitor->win32.adapterName) != 0)
return TRUE; return TRUE;
monitor->win32.handle = handle;
// If the monitor driver is installed, we will already have an accurate name for the monitor. // If the monitor driver is installed, we will already have an accurate name for the monitor.
if (strcmp(monitor->name, "Generic PnP Monitor") != 0) if (strcmp(monitor->name, "Generic PnP Monitor") != 0)
return TRUE; return TRUE;
monitor->win32.handle = handle;
accurateMonitorName = tryGetAccurateMonitorName(mi.szDevice); accurateMonitorName = tryGetAccurateMonitorName(mi.szDevice);
if(accurateMonitorName != NULL) if(accurateMonitorName != NULL)
{ {