DXGL r29 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r28‎ | r29 | r30 >
Date:18:15, 18 December 2011
Author:admin
Status:new
Tags:
Comment:
Delete Code::Blocks projects again. More compiler fixes
Modified paths:
  • /cfgmgr/cfgmgr.cbp (deleted) (history)
  • /cfgmgr/cfgmgr.cpp (modified) (history)
  • /cfgmgr/cfgmgr.depend (deleted) (history)
  • /cfgmgr/cfgmgr.layout (deleted) (history)
  • /common/common.cbp (deleted) (history)
  • /common/common.layout (deleted) (history)
  • /dxgl.workspace (deleted) (history)
  • /dxglcfg/dxglcfg.cpp (modified) (history)

Diff [purge]

Index: dxgl.workspace
@@ -1,7 +0,0 @@
2 -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
3 -<CodeBlocks_workspace_file>
4 - <Workspace title="DXGL">
5 - <Project filename="cfgmgr/cfgmgr.cbp" />
6 - <Project filename="common/common.cbp" active="1" />
7 - </Workspace>
8 -</CodeBlocks_workspace_file>
Index: cfgmgr/cfgmgr.layout
@@ -1,10 +0,0 @@
2 -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
3 -<CodeBlocks_layout_file>
4 - <ActiveTarget name="Unicode Debug" />
5 - <File name="cfgmgr.cpp" open="0" top="0" tabpos="0">
6 - <Cursor position="7397" topLine="210" />
7 - </File>
8 - <File name="stdafx.h" open="0" top="0" tabpos="0">
9 - <Cursor position="972" topLine="0" />
10 - </File>
11 -</CodeBlocks_layout_file>
Index: cfgmgr/cfgmgr.cbp
@@ -1,82 +0,0 @@
2 -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
3 -<CodeBlocks_project_file>
4 - <FileVersion major="1" minor="6" />
5 - <Project>
6 - <Option title="cfgmgr" />
7 - <Option pch_mode="2" />
8 - <Option compiler="gcc" />
9 - <Build>
10 - <Target title="Debug">
11 - <Option output="libcfgmgr" prefix_auto="1" extension_auto="1" />
12 - <Option working_dir="" />
13 - <Option object_output="obj\Debug\" />
14 - <Option type="2" />
15 - <Option compiler="gcc" />
16 - <Option createDefFile="1" />
17 - <Compiler>
18 - <Add option="-Wall" />
19 - <Add option="-g" />
20 - </Compiler>
21 - </Target>
22 - <Target title="Release">
23 - <Option output="libcfgmgr" prefix_auto="1" extension_auto="1" />
24 - <Option working_dir="" />
25 - <Option object_output="obj\Release\" />
26 - <Option type="2" />
27 - <Option compiler="gcc" />
28 - <Option createDefFile="1" />
29 - <Compiler>
30 - <Add option="-Wall" />
31 - <Add option="-O2" />
32 - </Compiler>
33 - <Linker>
34 - <Add option="-s" />
35 - </Linker>
36 - </Target>
37 - <Target title="Unicode Debug">
38 - <Option output="libcfgmgr" prefix_auto="1" extension_auto="1" />
39 - <Option working_dir="" />
40 - <Option object_output="obj\Unicode Debug\" />
41 - <Option type="2" />
42 - <Option compiler="gcc" />
43 - <Option createDefFile="1" />
44 - <Compiler>
45 - <Add option="-Wall" />
46 - <Add option="-g" />
47 - <Add option="-DUNICODE" />
48 - <Add option="-D_UNICODE" />
49 - </Compiler>
50 - </Target>
51 - <Target title="Unicode Release">
52 - <Option output="libcfgmgr" prefix_auto="1" extension_auto="1" />
53 - <Option working_dir="" />
54 - <Option object_output="obj\Unicode Release\" />
55 - <Option type="2" />
56 - <Option compiler="gcc" />
57 - <Option createDefFile="1" />
58 - <Compiler>
59 - <Add option="-O2" />
60 - <Add option="-Wall" />
61 - <Add option="-DUNICODE" />
62 - <Add option="-D_UNICODE" />
63 - </Compiler>
64 - <Linker>
65 - <Add option="-s" />
66 - </Linker>
67 - </Target>
68 - </Build>
69 - <Unit filename="ReadMe.txt" />
70 - <Unit filename="cfgmgr.cpp" />
71 - <Unit filename="cfgmgr.h" />
72 - <Unit filename="crc32.cpp" />
73 - <Unit filename="crc32.h" />
74 - <Unit filename="stdafx.cpp" />
75 - <Unit filename="stdafx.h" />
76 - <Extensions>
77 - <code_completion />
78 - <envvars />
79 - <debugger />
80 - <lib_finder disable_auto="1" />
81 - </Extensions>
82 - </Project>
83 -</CodeBlocks_project_file>
Index: cfgmgr/cfgmgr.depend
@@ -1 +0,0 @@
2 -# depslib dependency file v1.0
Index: common/common.cbp
@@ -1,76 +0,0 @@
2 -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
3 -<CodeBlocks_project_file>
4 - <FileVersion major="1" minor="6" />
5 - <Project>
6 - <Option title="common" />
7 - <Option pch_mode="2" />
8 - <Option compiler="gcc" />
9 - <Build>
10 - <Target title="Debug">
11 - <Option output="bin\Debug\common" prefix_auto="1" extension_auto="1" />
12 - <Option object_output="obj\Debug\" />
13 - <Option type="1" />
14 - <Option compiler="gcc" />
15 - <Compiler>
16 - <Add option="-g" />
17 - </Compiler>
18 - </Target>
19 - <Target title="Release">
20 - <Option output="bin\Release\common" prefix_auto="1" extension_auto="1" />
21 - <Option object_output="obj\Release\" />
22 - <Option type="1" />
23 - <Option compiler="gcc" />
24 - <Compiler>
25 - <Add option="-O2" />
26 - </Compiler>
27 - <Linker>
28 - <Add option="-s" />
29 - </Linker>
30 - </Target>
31 - <Target title="Unicode Debug">
32 - <Option output="bin\Debug\common" prefix_auto="1" extension_auto="1" />
33 - <Option object_output="obj\Unicode Debug\" />
34 - <Option type="1" />
35 - <Option compiler="gcc" />
36 - <Compiler>
37 - <Add option="-g" />
38 - <Add option="-DUNICODE" />
39 - <Add option="-D_UNICODE" />
40 - </Compiler>
41 - </Target>
42 - <Target title="Unicode Release">
43 - <Option output="bin\Release\common" prefix_auto="1" extension_auto="1" />
44 - <Option object_output="obj\Unicode Release\" />
45 - <Option type="1" />
46 - <Option compiler="gcc" />
47 - <Compiler>
48 - <Add option="-O2" />
49 - <Add option="-DUNICODE" />
50 - <Add option="-D_UNICODE" />
51 - </Compiler>
52 - <Linker>
53 - <Add option="-s" />
54 - </Linker>
55 - </Target>
56 - </Build>
57 - <Compiler>
58 - <Add option="-Wall" />
59 - </Compiler>
60 - <Unit filename="dxgl.ico" />
61 - <Unit filename="dxgl.png" />
62 - <Unit filename="dxgl48.ico" />
63 - <Unit filename="dxglicon.svg" />
64 - <Unit filename="dxglinv.bmp" />
65 - <Unit filename="dxglinv64.bmp" />
66 - <Unit filename="dxglsm.ico" />
67 - <Unit filename="star.ico" />
68 - <Unit filename="version.h" />
69 - <Unit filename="version.nsh" />
70 - <Extensions>
71 - <code_completion />
72 - <envvars />
73 - <debugger />
74 - <lib_finder disable_auto="1" />
75 - </Extensions>
76 - </Project>
77 -</CodeBlocks_project_file>
Index: common/common.layout
@@ -1,4 +0,0 @@
2 -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
3 -<CodeBlocks_layout_file>
4 - <ActiveTarget name="Debug" />
5 -</CodeBlocks_layout_file>
Index: cfgmgr/cfgmgr.cpp
@@ -156,7 +156,7 @@
157157 paths = (LPTSTR)malloc(sizeout*sizeof(TCHAR));
158158 ZeroMemory(paths,sizeout*sizeof(TCHAR));
159159 _tcscpy(paths,path);
160 - error = RegSetValueEx(hKey,_T("InstallPaths"),NULL,REG_MULTI_SZ,(LPBYTE)paths,sizeout);
 160+ error = RegSetValueEx(hKey,_T("InstallPaths"),0,REG_MULTI_SZ,(LPBYTE)paths,sizeout);
161161 free(paths);
162162 }
163163 else
@@ -168,7 +168,7 @@
169169 {
170170 AddStringToMultiSz(paths,path);
171171 sizeout += (MAX_PATH*2)+4;
172 - error = RegSetValueEx(hKey,_T("InstallPaths"),NULL,REG_MULTI_SZ,(LPBYTE)paths,sizeout);
 172+ error = RegSetValueEx(hKey,_T("InstallPaths"),0,REG_MULTI_SZ,(LPBYTE)paths,sizeout);
173173 }
174174 free(paths);
175175 }
Index: dxglcfg/dxglcfg.cpp
@@ -34,7 +34,6 @@
3535 typedef string tstring;
3636 #endif
3737
38 -
3938 #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
4039 #define GL_MAX_SAMPLES_EXT 0x8D57
4140 #define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
@@ -390,7 +389,7 @@
391390 SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,5,(LPARAM)buffer);
392391 _tcscpy(buffer,_T("Center if mode not found"));
393392 SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,6,(LPARAM)buffer);
394 - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_SETCURSEL,cfg->scaler,NULL);
 393+ SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_SETCURSEL,cfg->scaler,0);
395394 // colormode
396395 if(cfg->colormode) SendDlgItemMessage(hWnd,IDC_COLOR,BM_SETCHECK,BST_CHECKED,NULL);
397396 else SendDlgItemMessage(hWnd,IDC_COLOR,BM_SETCHECK,BST_UNCHECKED,NULL);
@@ -656,7 +655,7 @@
657656 {
658657 if(OpenProcessToken(GetCurrentProcess(),TOKEN_QUERY,&token))
659658 {
660 - if(GetTokenInformation(token,TokenElevation,&elevation,sizeof(TOKEN_ELEVATION),(PDWORD)&outlen))
 659+ if(GetTokenInformation(token,(TOKEN_INFORMATION_CLASS)TokenElevation,&elevation,sizeof(TOKEN_ELEVATION),(PDWORD)&outlen))
661660 {
662661 if(!elevation.TokenIsElevated)
663662 {