[vlc-commits] direct3d11: detect windows 10 with an entry in kernel32.dll

Steve Lhomme git at videolan.org
Fri Oct 19 11:06:07 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Oct 16 16:17:00 2018 +0200| [6c22482e5aa6480db95a1c8d92f18a748ec2096e] | committer: Steve Lhomme

direct3d11: detect windows 10 with an entry in kernel32.dll

Like we do for everything else.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6c22482e5aa6480db95a1c8d92f18a748ec2096e
---

 modules/video_output/win32/direct3d11.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 0fd8f13c8a..147e71f1a5 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -495,18 +495,14 @@ static void FillSwapChainDesc(vout_display_t *vd, DXGI_SWAP_CHAIN_DESC1 *out)
     //out->Flags = 512; // DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO;
 
     bool isWin10OrGreater = false;
-    HMODULE hKernelBase = GetModuleHandle(TEXT("kernelbase.dll"));
-    if (likely(hKernelBase != NULL))
-    {
-        isWin10OrGreater = GetProcAddress(hKernelBase, "VirtualAllocFromApp") != NULL;
-        FreeLibrary(hKernelBase);
-    }
+    HMODULE hKernel32 = GetModuleHandle(TEXT("kernel32.dll"));
+    if (likely(hKernel32 != NULL))
+        isWin10OrGreater = GetProcAddress(hKernel32, "GetSystemCpuSetInformation") != NULL;
     if (isWin10OrGreater)
         out->SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
     else
     {
         bool isWin80OrGreater = false;
-        HMODULE hKernel32 = GetModuleHandle(TEXT("kernel32.dll"));
         if (likely(hKernel32 != NULL))
             isWin80OrGreater = GetProcAddress(hKernel32, "CheckTokenCapability") != NULL;
         if (isWin80OrGreater)



More information about the vlc-commits mailing list