DXGL r20 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r19‎ | r20 | r21 >
Date:20:54, 10 December 2011
Author:admin
Status:new
Tags:
Comment:
Add content to help file.
Fix post-install for dxgltest
Modified paths:
  • /Help (modified) (history)
  • /Help/Help.vcxproj (modified) (history)
  • /Help/Help.vcxproj.filters (modified) (history)
  • /Help/configuration.htm (added) (history)
  • /Help/dxgl.css (added) (history)
  • /Help/dxgl.hhp (modified) (history)
  • /Help/dxglcfg.png (added) (history)
  • /Help/introduction.htm (added) (history)
  • /Help/toc.hhc (modified) (history)
  • /dxglcfg/dxglcfg.rc (modified) (history)
  • /dxgltest/dxgltest.cpp (modified) (history)

Diff [purge]

Index: Help/Help.vcxproj
@@ -60,8 +60,16 @@
6161 </Link>
6262 </ItemDefinitionGroup>
6363 <ItemGroup>
 64+ <None Include="configuration.htm">
 65+ <DeploymentContent>true</DeploymentContent>
 66+ </None>
 67+ <None Include="dxgl.css" />
6468 <None Include="dxgl.hhp" />
 69+ <None Include="dxglcfg.png" />
6570 <None Include="Index.hhk" />
 71+ <None Include="introduction.htm">
 72+ <DeploymentContent>true</DeploymentContent>
 73+ </None>
6674 <None Include="toc.hhc" />
6775 </ItemGroup>
6876 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Index: Help/Help.vcxproj.filters
@@ -15,5 +15,17 @@
1616 <None Include="toc.hhc">
1717 <Filter>Help files</Filter>
1818 </None>
 19+ <None Include="introduction.htm">
 20+ <Filter>Help files</Filter>
 21+ </None>
 22+ <None Include="configuration.htm">
 23+ <Filter>Help files</Filter>
 24+ </None>
 25+ <None Include="dxglcfg.png">
 26+ <Filter>Help files</Filter>
 27+ </None>
 28+ <None Include="dxgl.css">
 29+ <Filter>Help files</Filter>
 30+ </None>
1931 </ItemGroup>
2032 </Project>
\ No newline at end of file
Index: Help/configuration.htm
@@ -0,0 +1,60 @@
 2+<!DOCTYPE html>
 3+<html>
 4+ <head>
 5+ <title>Configuration</title>
 6+ <link rel="stylesheet" type="text/css" href="dxgl.css" />
 7+ </head>
 8+ <body>
 9+ <img src="dxglcfg.png" alt="DXGL Config" usemap="#cfgmap" class="noborder" />
 10+ <map name="cfgmap">
 11+ <area shape="rect" coords="9,31,281,389" alt="Applications" href="#applist" />
 12+ <area shape="rect" coords="9,393,144,416" alt="Add..." href="#add" />
 13+ <area shape="rect" coords="147,393,282,416" alt="Remove" href="#remove" />
 14+ <area shape="rect" coords="296,47,449,82" alt="Video mode" href="#vidmode" />
 15+ <area shape="rect" coords="296,87,449,123" alt="Sort video modes" href="#sortmodes" />
 16+ <area shape="rect" coords="452,46,564,59" alt="Change color depth" href="#changedepth" />
 17+ <area shape="rect" coords="452,68,589,81" alt="Adjust primary resolution" href="#adjustprimary" />
 18+ </map>
 19+ <h1>Configuration</h1>
 20+ Configuration for DXGL can be accessed by opening the &quot;DXGL Config&quot; program in the DXGL program group. Configuration is as follows:
 21+ <h2><a name="applist" />Applications</h2>
 22+ Lists the applications currently using DXGL. Also contains a &quot;Global&quot; entry to set default options.
 23+ When a specific application is selected, a gray or filled checkbox or a groupbox set to &quot;(global default)&quot; means that the global setting will be used.
 24+ <h2><a name="add" />Add...</h2>
 25+ Adds an application to the DXGL registry and copies the DXGL ddraw.dll file to its installation folder. Requires write permission to the installation folder.
 26+ Windows Vista or later may display a UAC prompt.
 27+ <h2><a name="remove" />Remove</h2>
 28+ Removes the selected application from the DXGL registry and deletes the DXGL ddraw.dll file from its installation folder. Requires write permission to the installation folder.
 29+ Windows Vista or later may display a UAC prompt.
 30+ <h2><a name="vidmode" />Video mode</h2>
 31+ Selects the method to handle video mode changes using the IDirectDraw::SetDisplayMode API. The following methods are available:
 32+ <h3>Change desktop resolution</h3>
 33+ Changes the resolution of the Windows desktop to match the paramaters of SetDisplayMode. The function will return an error if an incompatible mode is attempted.
 34+ <h3>Stretch to screen</h3>
 35+ Stretches the primary surface to fill the entire screen.
 36+ <h3>Aspect corrected stretch</h3>
 37+ Scales the primary surface to fit the screen, while preserving the original aspect ratio.
 38+ <h3>Center image on screen</h3>
 39+ Displays the primary surface as an unscaled image in the center of the screen.
 40+ <h3>Stretch if mode not found</h3>
 41+ Attempts to change the desktop resolution. If the mode is not compatible, chooses the closest mode and stretches the primary to the screen.
 42+ <h3>Scale if mode not found</h3>
 43+ Attempts to change the desktop resolution. If the mode is not compatible, chooses the closest mode and scales the primary to the screen, preserving aspect ratio.
 44+ <h3>Center if mode not found</h3>
 45+ Attempts to change the desktop resolution. If the mode is not compatible, chooses the closest mode and displays the primary in the center of the screen.
 46+ <h2><a name="sortmodes" />Sort video modes</h2>
 47+ Determines how to sort the video modes returned by IDirectDraw::EnumDisplayModes
 48+ <h3>Use system order</h3>
 49+ Lists modes by the order generated by the system and/or DXGL.
 50+ <h3>Group by color depth</h3>
 51+ Lists modes in groups of color depth, each group sorted by resolution.
 52+ <h3>Group by resolution</h3>
 53+ Lists modes sorted by resolution, with color depths listed in order for each resolution.
 54+ <h2><a name="changedepth" />Change color depth</h2>
 55+ Determines whether to change the color depth of the desktop if requested by the application. Use only for testing purposes, leave off otherwise.
 56+ <h2><a name="adjustprimary" />Adjust primary resolution</h2>
 57+ If checked, will create a virtual primary buffer at the screen resolution instead of the normal primary resolution. May cause slowdowns in certain applications or on certain computers.
 58+
 59+
 60+ </body>
 61+</html>
\ No newline at end of file
Index: Help/dxgl.css
@@ -0,0 +1,2 @@
 2+.noborder
 3+{border:none;}
\ No newline at end of file
Index: Help/dxgl.hhp
@@ -2,6 +2,7 @@
33 Compatibility=1.1 or later
44 Compiled file=dxgl.chm
55 Contents file=toc.hhc
 6+Default topic=introduction.htm
67 Display compile progress=No
78 Index file=Index.hhk
89 Language=0x409 English (United States)
@@ -8,5 +9,11 @@
910 Title=DXGL Help
1011
1112
 13+[FILES]
 14+introduction.htm
 15+configuration.htm
 16+dxgl.css
 17+dxglcfg.png
 18+
1219 [INFOTYPES]
1320
Index: Help/dxglcfg.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: Help/dxglcfg.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
 21+application/octet-stream
\ No newline at end of property
Index: Help/introduction.htm
@@ -0,0 +1,10 @@
 2+<!DOCTYPE html>
 3+<html>
 4+ <head>
 5+ <title>Introduction</title>
 6+ </head>
 7+ <body>
 8+ <p>DXGL is a project to create a DirectDraw/Direct3D version 1 to 7 implementation that runs on OpenGL 2.0. It is intended to alleviate some of the graphics glitches inherent with using legacy DirectX interfaces on modern video cards. The API will be 100% binary compatible with the system ddraw.dll file.</p>
 9+ <p>DXGL is currently in an alpha stage of development and very little works at this point.</p>
 10+ </body>
 11+</html>
\ No newline at end of file
Index: Help/toc.hhc
@@ -10,12 +10,11 @@
1111 <UL>
1212 <LI> <OBJECT type="text/sitemap">
1313 <param name="Name" value="Introduction">
 14+ <param name="Local" value="introduction.htm">
1415 </OBJECT>
1516 <LI> <OBJECT type="text/sitemap">
16 - <param name="Name" value="Installation">
17 - </OBJECT>
18 - <LI> <OBJECT type="text/sitemap">
1917 <param name="Name" value="Configuration">
 18+ <param name="Local" value="configuration.htm">
2019 </OBJECT>
2120 </UL>
2221 </BODY></HTML>
Index: Help
Property changes on: Help
___________________________________________________________________
Modified: svn:ignore
## -1,2 +1,4 ##
2322 Debug
2423 Release
 24+dxgl.chm
 25+dxgl.chw
Index: dxglcfg/dxglcfg.rc
@@ -69,8 +69,8 @@
7070 AUTOCHECKBOX "Adjust Primary resolution", IDC_HIGHRES, 299, 28, 96, 8
7171 AUTOCHECKBOX "Support All Color Depths", IDC_UNCOMMONCOLOR, 299, 55, 94, 8
7272 AUTOCHECKBOX "Add Extra Display Modes", IDC_EXTRAMODES, 299, 42, 100, 8
73 - LTEXT "Sort video modes", IDC_STATIC, 196, 39, 56, 8, SS_LEFT
74 - COMBOBOX IDC_SORTMODES, 196, 49, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
 73+ LTEXT "Sort video modes", IDC_STATIC, 195, 39, 56, 8, SS_LEFT
 74+ COMBOBOX IDC_SORTMODES, 195, 49, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
7575 }
7676
7777
Index: dxgltest/dxgltest.cpp
@@ -500,7 +500,7 @@
501501
502502 int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
503503 {
504 - if(_tcsstr(lpCmdLine,_T(" install")))
 504+ if(!_tcsnicmp(lpCmdLine,_T("install"),7))
505505 {
506506 LPDIRECTDRAW lpdd;
507507 DirectDrawCreate(NULL,&lpdd,NULL);