DXGL r889 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r888‎ | r889 | r890 >
Date:01:13, 7 January 2019
Author:admin
Status:new
Tags:
Comment:
Hide Software D3D checkbox in DXGL Test if ddraw.dll is DXGL.
Modified paths:
  • /dxglcfg/dxgltest.cpp (modified) (history)

Diff [purge]

Index: dxglcfg/dxgltest.cpp
@@ -1,5 +1,5 @@
22 // DXGL
3 -// Copyright (C) 2011-2017 William Feely
 3+// Copyright (C) 2011-2019 William Feely
44
55 // This library is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU Lesser General Public
@@ -268,6 +268,7 @@
269269 double f;
270270 LPDIRECTDRAW lpdd;
271271 HRESULT error;
 272+ HMODULE hddraw;
272273 int width,height,bpp,refresh;
273274 switch(Msg)
274275 {
@@ -283,6 +284,11 @@
284285 IDirectDraw_Release(lpdd);
285286 }
286287 SendDlgItemMessage(hWnd,IDC_VIDMODES,LB_SETCURSEL,modenum,0);
 288+ hddraw = GetModuleHandle(_T("ddraw.dll"));
 289+ if (hddraw)
 290+ {
 291+ if (GetProcAddress(hddraw, "IsDXGLDDraw")) DestroyWindow(GetDlgItem(hWnd, IDC_SOFTD3D));
 292+ }
287293 break;
288294 case WM_COMMAND:
289295 switch(LOWORD(wParam))