mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
Remove voodoo workaround from find_acceptable_display_mode.
This commit is contained in:
parent
bace12e8d7
commit
dd2b42eaf1
@ -2304,21 +2304,7 @@ find_acceptable_display_mode(DWORD dwWidth, DWORD dwHeight, DWORD bpp,
|
||||
|
||||
if ((dm.dmPelsWidth == dwWidth) && (dm.dmPelsHeight == dwHeight) &&
|
||||
(dm.dmBitsPerPel == bpp)) {
|
||||
// cout << "[FS FOUND] " << dwWidth << "x" << dwHeight << "@" << bpp << endl;
|
||||
// We want to modify the current DEVMODE rather than using a fresh one in order
|
||||
// to work around a Windows 7 bug.
|
||||
ZeroMemory(&dm, sizeof(dm));
|
||||
dm.dmSize = sizeof(dm);
|
||||
if (0 != EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm)){
|
||||
dm.dmPelsWidth = dwWidth;
|
||||
dm.dmPelsHeight = dwHeight;
|
||||
dm.dmBitsPerPel = bpp;
|
||||
return true;
|
||||
} else {
|
||||
windisplay_cat.error()
|
||||
<< "Couldn't retrieve active device mode.\n";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
modenum++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user