Index: cfgmgr/cfgmgr.cpp |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | // DXGL
|
3 | | -// Copyright (C) 2011 William Feely
|
| 3 | +// Copyright (C) 2011-2012 William Feely
|
4 | 4 |
|
5 | 5 | // This library is free software; you can redistribute it and/or
|
6 | 6 | // modify it under the terms of the GNU Lesser General Public
|
— | — | @@ -139,9 +139,6 @@ |
140 | 140 | cfg->AllColorDepths = ReadBool(hKey,cfg->AllColorDepths,cfgmask->AllColorDepths,_T("AllColorDepths"));
|
141 | 141 | cfg->ExtraModes = ReadBool(hKey,cfg->ExtraModes,cfgmask->ExtraModes,_T("ExtraModes"));
|
142 | 142 | cfg->vsync = ReadDWORD(hKey,cfg->vsync,cfgmask->vsync,_T("VSync"));
|
143 | | - cfg->audio3d = ReadBool(hKey,cfg->audio3d,cfgmask->audio3d,_T("Use3DAudio"));
|
144 | | - cfg->audioglobal = ReadBool(hKey,cfg->audioglobal,cfgmask->audioglobal,_T("GlobalAudio"));
|
145 | | - cfg->inputglobal = ReadBool(hKey,cfg->inputglobal,cfgmask->inputglobal,_T("GlobalInput"));
|
146 | 143 | if(!global && dll)
|
147 | 144 | {
|
148 | 145 | LPTSTR paths;
|
Index: cfgmgr/cfgmgr.h |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | // DXGL
|
3 | | -// Copyright (C) 2011 William Feely
|
| 3 | +// Copyright (C) 2011-2012 William Feely
|
4 | 4 |
|
5 | 5 | // This library is free software; you can redistribute it and/or
|
6 | 6 | // modify it under the terms of the GNU Lesser General Public
|
— | — | @@ -35,9 +35,6 @@ |
36 | 36 | DWORD SortModes;
|
37 | 37 | bool AllColorDepths;
|
38 | 38 | bool ExtraModes;
|
39 | | - bool audio3d;
|
40 | | - bool audioglobal;
|
41 | | - bool inputglobal;
|
42 | 39 | } DXGLCFG;
|
43 | 40 |
|
44 | 41 | void ReadSettings(HKEY hKey, DXGLCFG *cfg, DXGLCFG *mask, bool global, bool dll, LPTSTR dir);
|
Index: ddraw/glDirect3DDevice.cpp |
— | — | @@ -418,22 +418,29 @@ |
419 | 419 | glMaterialf(GL_FRONT_AND_BACK,GL_SHININESS,material.power);
|
420 | 420 | return D3D_OK;
|
421 | 421 | }
|
| 422 | +
|
| 423 | +inline void dwordto4float(DWORD in, GLfloat *out)
|
| 424 | +{
|
| 425 | +
|
| 426 | +}
|
| 427 | +
|
422 | 428 | HRESULT WINAPI glDirect3DDevice7::SetRenderState(D3DRENDERSTATETYPE dwRendStateType, DWORD dwRenderState)
|
423 | 429 | {
|
| 430 | + GLfloat floats[4];
|
| 431 | + if(dwRendStateType > 152) return DDERR_INVALIDPARAMS;
|
| 432 | + if(dwRendStateType < 0) return DDERR_INVALIDPARAMS;
|
| 433 | + renderstate[dwRendStateType] = dwRenderState;
|
424 | 434 | switch(dwRendStateType)
|
425 | 435 | {
|
426 | 436 | case D3DRENDERSTATE_ANTIALIAS:
|
427 | | - renderstate[dwRendStateType] = dwRenderState;
|
428 | 437 | if(dwRenderState == 0) glDisable(GL_MULTISAMPLE);
|
429 | 438 | else glEnable(GL_MULTISAMPLE);
|
430 | 439 | return D3D_OK;
|
431 | 440 | case D3DRENDERSTATE_TEXTUREPERSPECTIVE:
|
432 | | - renderstate[dwRendStateType] = dwRenderState;
|
433 | 441 | if(dwRenderState) glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST);
|
434 | 442 | else glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_FASTEST);
|
435 | 443 | return D3D_OK;
|
436 | 444 | case D3DRENDERSTATE_ZENABLE:
|
437 | | - renderstate[dwRendStateType] = dwRenderState;
|
438 | 445 | switch(dwRenderState)
|
439 | 446 | {
|
440 | 447 | case D3DZB_FALSE:
|
— | — | @@ -445,6 +452,13 @@ |
446 | 453 | glEnable(GL_DEPTH_TEST);
|
447 | 454 | }
|
448 | 455 | return D3D_OK;
|
| 456 | + case D3DRENDERSTATE_LIGHTING:
|
| 457 | + if(dwRenderState) glEnable(GL_LIGHTING);
|
| 458 | + else glDisable(GL_LIGHTING);
|
| 459 | + return D3D_OK;
|
| 460 | + case D3DRENDERSTATE_AMBIENT:
|
| 461 | + dwordto4float(dwRenderState,floats);
|
| 462 | +
|
449 | 463 | default:
|
450 | 464 | ERR(DDERR_INVALIDPARAMS);
|
451 | 465 | }
|
Index: dxglcfg/dxglcfg.rc |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | // DXGL
|
3 | | -// Copyright (C) 2011 William Feely
|
| 3 | +// Copyright (C) 2011-2012 William Feely
|
4 | 4 |
|
5 | 5 | // This library is free software; you can redistribute it and/or
|
6 | 6 | // modify it under the terms of the GNU Lesser General Public
|
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | LTEXT "Applications", IDC_STATIC, 4, 4, 39, 8, SS_LEFT
|
43 | 43 | PUSHBUTTON "A&dd...", IDC_ADD, 4, 228, 90, 14
|
44 | 44 | PUSHBUTTON "&Remove", IDC_REMOVE, 96, 228, 90, 14, WS_DISABLED
|
45 | | - GROUPBOX "Graphics", IDC_STATIC, 190, 4, 211, 184
|
| 45 | + GROUPBOX "Graphics", IDC_STATIC, 190, 4, 211, 238
|
46 | 46 | LTEXT "Video mode", IDC_STATIC, 195, 14, 38, 8, SS_LEFT
|
47 | 47 | COMBOBOX IDC_VIDMODE, 195, 24, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
48 | 48 | AUTOCHECKBOX "Change color depth", IDC_COLOR, 299, 14, 79, 10
|
— | — | @@ -60,12 +60,6 @@ |
61 | 61 | COMBOBOX IDC_MSAA, 196, 155, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
62 | 62 | LTEXT "Aspect ratio", IDC_STATIC, 300, 145, 40, 8, SS_LEFT
|
63 | 63 | COMBOBOX IDC_ASPECT, 299, 155, 100, 14, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
64 | | - GROUPBOX "Audio", IDC_STATIC, 190, 190, 211, 24
|
65 | | - AUTOCHECKBOX "Enable 3D audio", IDC_AUDIO3D, 194, 200, 67, 10, WS_DISABLED
|
66 | | - AUTOCHECKBOX "Force global audio", IDC_AUDIOGLOBAL, 299, 200, 74, 10, WS_DISABLED
|
67 | | - GROUPBOX "Input", IDC_STATIC, 190, 216, 211, 26
|
68 | | - AUTOCHECKBOX "Force global input", IDC_INPUTGLOBAL, 194, 227, 73, 10, WS_DISABLED
|
69 | | - PUSHBUTTON "Configure controllers...", IDC_INPUTCFG, 299, 223, 80, 14, WS_DISABLED
|
70 | 64 | AUTOCHECKBOX "Always cache surfaces to system memory", IDC_SYSMEMCACHE, 196, 173, 149, 10
|
71 | 65 | AUTOCHECKBOX "Adjust Primary resolution", IDC_HIGHRES, 299, 28, 96, 8
|
72 | 66 | AUTOCHECKBOX "Support All Color Depths", IDC_UNCOMMONCOLOR, 299, 55, 94, 8
|
— | — | @@ -91,6 +85,7 @@ |
92 | 86 | IDI_STAR ICON "..\\common\\star.ico"
|
93 | 87 |
|
94 | 88 |
|
| 89 | +
|
95 | 90 | //
|
96 | 91 | // Version Information resources
|
97 | 92 | //
|
— | — | @@ -124,6 +119,7 @@ |
125 | 120 | }
|
126 | 121 |
|
127 | 122 |
|
| 123 | +
|
128 | 124 | //
|
129 | 125 | // Manifest resources
|
130 | 126 | //
|
Index: dxglcfg/resource.h |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | // DXGL
|
3 | | -// Copyright (C) 2011 William Feely
|
| 3 | +// Copyright (C) 2011-2012 William Feely
|
4 | 4 |
|
5 | 5 | // This library is free software; you can redistribute it and/or
|
6 | 6 | // modify it under the terms of the GNU Lesser General Public
|
— | — | @@ -31,7 +31,6 @@ |
32 | 32 | #define IDC_APPS 1037
|
33 | 33 | #define IDC_ADD 1038
|
34 | 34 | #define IDC_REMOVE 1039
|
35 | | -#define IDC_INSTALL 1040
|
36 | 35 | #define IDC_VIDMODE 1041
|
37 | 36 | #define IDC_SCALE 1042
|
38 | 37 | #define IDC_VSYNC 1043
|
— | — | @@ -42,8 +41,4 @@ |
43 | 42 | #define IDC_MSAA 1048
|
44 | 43 | #define IDC_COLOR 1049
|
45 | 44 | #define IDC_ASPECT 1050
|
46 | | -#define IDC_AUDIO3D 1051
|
47 | | -#define IDC_AUDIOGLOBAL 1052
|
48 | | -#define IDC_INPUTGLOBAL 1053
|
49 | | -#define IDC_INPUTCFG 1054
|
50 | 45 | #define IDC_EXTRAMODES 1055
|