DXGL r950 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r949‎ | r950
Date:21:29, 20 September 2019
Author:admin
Status:new
Tags:
Comment:
Disable incomplete overlay support.
Update readme to describe VS2005/2008 builds and debug trace mode.
Remove beta tag from releasever.h for release.
Modified paths:
  • /ReadMe.md (modified) (history)
  • /common/releasever.h (modified) (history)
  • /ddraw/glDirectDraw.cpp (modified) (history)

Diff [purge]

Index: ReadMe.md
@@ -1,3 +1,4 @@
 2+<!--Please enable Word Wrap in Notepad to view this document.-->
23 # DXGL 0.5.17
34 https://dxgl.org
45
@@ -5,10 +6,19 @@
67 DXGL is a free replacement for the Windows ddraw.dll library, running on OpenGL. It is designed to overcome driver bugs, particularly in Windows Vista and newer operating systems. It also adds various enhancements to the graphics output such as display scaling and filtering options. DXGL supports the DirectX 7.0 graphics APIs, however it is currently under development and many programs are not yet compatible with DXGL.
78
89 ## Updgrade notes
9 -If you upgrade from DXGL 0.5.8 or earlier, the configuration format will be changed, and earlier versions of DXGL will no longer recognize the profiles.
10 -In addition, any profiles generated by older versions of DXGL going forward will not be recognized by DXGL 0.5.9 or later.
11 -If you wish to migrate any old profiles generated after installing DXGL 0.5.9 or later, you will need to use Regedit to delete the "Configuration Version" registry value from the HKEY_CURRENT_USER\SOFTWARE\DXGL registry key to force the upgrade to be run again.
 10+### DXGL 0.5.8
 11+If you upgrade from DXGL 0.5.8 or earlier, the configuration format will be changed, and earlier versions of DXGL will no longer recognize the profiles. In addition, any profiles generated by older versions of DXGL going forward will not be recognized by DXGL 0.5.9 or later. If you wish to migrate any old profiles generated after installing DXGL 0.5.9 or later, you will need to use Regedit to delete the “Configuration Version” registry value from the HKEY_CURRENT_USER\SOFTWARE\DXGL registry key to force the upgrade to be run again. In order to re-run the upgrade, re-run the DXGL installer.
1212
 13+### DXGL 0.5.13
 14+DXGL 0.5.13 fixes up the default value for the “Add color depths” option, because version 0.5.12 and earlier had a default not compatible with current versions. This one-time conversion resets the value for AddColorDepths in the registry entries to 1+4+16 which corresponds to enabling color depths 8-bit, 16-bit, and 32-bit, in order to ensure compatibility with Windows 8 and above.
 15+
 16+The “Configuration Version” registry value in HKEY_CURRENT_USER\SOFTWARE\DXGL will be incremented to 2 in order to indicate this fix has been applied.
 17+
 18+### DXGL 0.5.17
 19+Due to a bug found in the method used to uniquely identify profile paths, DXGL 0.5.17 and above will perform a one-time renaming of the profile registry keys. These new profiles will no longer be compatible with DXGL 0.5.16 or below.
 20+
 21+The “Configuration Version” registry value in HKEY_CURRENT_USER\SOFTWARE\DXGL will be incremented to 3 in order to indicate this fix has been applied. If you need to migrate more version 2 profiles, change “Configuration Version” to 2 and re-run the installer.
 22+
1323 ## GitHub Notice
1424 If you downloaded the DXGL source code from GitHub, please note that when compiling DXGL, the version number will not indicate the revision number. This issue is also present when compiling from a zipped source code distribution from the dxgl.org, www.dxgl.info, or www.williamfeely.info website.
1525
@@ -33,6 +43,7 @@
3444 * TortoiseSVN (to fill in revision on SVN builds)
3545 * HTML Help Workshop (to build help)
3646 * NSIS (to build installer, requires TortoiseSVN and HTML Help Workshop to succeed)
 47+* In addition Visual C++ 2005 and Visual C++ 2008 project files are available in the vs8 and vs9 directories respectively.
3748
3849 ## Build Instructions
3950 These instructions assume that you do not have any of the required software installed. If you already have any or all of this software installed and set up, skip those steps.
@@ -43,6 +54,14 @@
4455 * Install NSIS from https://nsis.sourceforge.io/Main_Page
4556 * Open the dxgl.sln file, select your build configuration (Debug or Release) in the toolbar, and press F7 to build.
4657
 58+## Debug tracing
 59+The Debug Trace build has been removed from the project files for DXGL. Instead, DXGL now supports debug tracing files in all builds. To enable tracing in DXGL create a file named dxgl.cfg or dxgl.ini in you game folder and add the following to it:
 60+```
 61+[debug]
 62+DebugTraceLevel=3
 63+```
 64+This can be added to the [debug] section of any existing configuration file. Change back to 0 to disable tracing.
 65+
4766 ## Progress
4867 For detailed progress information, please check https://www.williamfeely.info/wiki/DXGL_Features
4968 What works:
Index: common/releasever.h
@@ -5,7 +5,7 @@
66 #define DXGLMAJORVER 0
77 #define DXGLMINORVER 5
88 #define DXGLPOINTVER 17
9 -#define DXGLBETA 1
 9+#define DXGLBETA 0
1010
1111 #define STR2(x) #x
1212 #define STR(x) STR2(x)
@@ -17,6 +17,6 @@
1818 1 - sign non-beta only
1919 2 - sign release only
2020 3 - sign all */
21 -#define SIGNMODE 1
 21+#define SIGNMODE 0
2222
2323 #endif //__VERSION_H
Index: ddraw/glDirectDraw.cpp
@@ -1471,8 +1471,8 @@
14721472 if (ddCaps.dwSize < sizeof(DDCAPS_DX3)) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
14731473 ddCaps.dwCaps = DDCAPS_BLT | DDCAPS_BLTCOLORFILL | DDCAPS_BLTDEPTHFILL | DDCAPS_BLTFOURCC |
14741474 DDCAPS_BLTSTRETCH | DDCAPS_COLORKEY | DDCAPS_GDI | DDCAPS_PALETTE | DDCAPS_CANBLTSYSMEM |
1475 - DDCAPS_3D | DDCAPS_CANCLIP | DDCAPS_CANCLIPSTRETCHED | DDCAPS_READSCANLINE |
1476 - DDCAPS_OVERLAY | DDCAPS_OVERLAYSTRETCH;
 1475+ DDCAPS_3D | DDCAPS_CANCLIP | DDCAPS_CANCLIPSTRETCHED | DDCAPS_READSCANLINE;// |
 1476+ //DDCAPS_OVERLAY | DDCAPS_OVERLAYSTRETCH;
14771477 ddCaps.dwCaps2 = DDCAPS2_CANRENDERWINDOWED | DDCAPS2_WIDESURFACES | DDCAPS2_NOPAGELOCKREQUIRED |
14781478 DDCAPS2_FLIPINTERVAL | DDCAPS2_FLIPNOVSYNC | DDCAPS2_NONLOCALVIDMEM;
14791479 ddCaps.dwFXCaps = DDFXCAPS_BLTSHRINKX | DDFXCAPS_BLTSHRINKY |
@@ -1485,10 +1485,10 @@
14861486 DDSCAPS_FRONTBUFFER | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_PALETTE |
14871487 DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOMEMORY | DDSCAPS_3DDEVICE |
14881488 DDSCAPS_NONLOCALVIDMEM | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE |
1489 - DDSCAPS_MIPMAP | DDSCAPS_OVERLAY;
 1489+ DDSCAPS_MIPMAP;// | DDSCAPS_OVERLAY;
14901490 ddCaps.ddsCaps.dwCaps2 = DDSCAPS2_MIPMAPSUBLEVEL;
1491 - ddCaps.dwMinOverlayStretch = 1;
1492 - ddCaps.dwMaxOverlayStretch = 2147483647;
 1491+ //ddCaps.dwMinOverlayStretch = 1;
 1492+ //ddCaps.dwMaxOverlayStretch = 2147483647;
14931493 ddCaps.dwCKeyCaps = DDCKEYCAPS_SRCBLT | DDCKEYCAPS_DESTBLT;
14941494 ddCaps.dwZBufferBitDepths = DDBD_16 | DDBD_24 | DDBD_32;
14951495 ddCaps.dwNumFourCCCodes = GetNumFOURCC();