]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Don't check D3D9 monitor names if Windows 10+
authorToni Wilen <twilen@winuae.net>
Sun, 21 Aug 2022 17:08:05 +0000 (20:08 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 21 Aug 2022 17:08:05 +0000 (20:08 +0300)
od-win32/win32gfx.cpp

index 87371e87ee7639647b97bc9bff27b73f12829475..b58026ea97170c1d6fc2edb9cf688111455acf91 100644 (file)
@@ -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;