From: Toni Wilen Date: Sun, 21 Aug 2022 17:08:05 +0000 (+0300) Subject: Don't check D3D9 monitor names if Windows 10+ X-Git-Tag: 41000~152 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=41913c02cd738edd703933d19cbc5c39b8786622;p=francis%2Fwinuae.git Don't check D3D9 monitor names if Windows 10+ --- diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 87371e87..b58026ea 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -926,17 +926,15 @@ void reenumeratemonitors(void) static void getd3dmonitornames (void) { - struct MultiDisplay *md = Displays; - IDirect3D9 *d3d; - int max; - // XP does not support hybrid displays, don't load Direct3D - if (!os_vista) + // Windows 10+ seems to use same names by default + if (!os_vista || os_win10) return; - d3d = Direct3DCreate9 (D3D_SDK_VERSION); + IDirect3D9 *d3d = Direct3DCreate9 (D3D_SDK_VERSION); if (!d3d) return; - max = d3d->GetAdapterCount (); + int max = d3d->GetAdapterCount (); + struct MultiDisplay* md = Displays; while (md - Displays < MAX_DISPLAYS && md->monitorid) { POINT pt; HMONITOR winmon;