Index: Help/dxglcfg.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: cfgmgr/ReadMe.txt |
— | — | @@ -121,6 +121,13 @@ |
122 | 122 | 0 - Automatic
|
123 | 123 | 1 - OpenGL Standard
|
124 | 124 |
|
| 125 | +Member aspect
|
| 126 | +REG_DWORD HKCU\DXGL\<app>\ScreenAspect
|
| 127 | +Screen aspect ratio to simulate, if the scaler is 1 or 4.
|
| 128 | +Stored as a 32-bit float encoded as a DWORD.
|
| 129 | +If zero, negative, or an invalid value, use automatic ratio based on square pixels.
|
| 130 | +Positive values indicate a specific screen aspect ratio.
|
| 131 | +
|
125 | 132 | Member Windows8Detected
|
126 | 133 | REG_DWORD HKCU\DXGL\Global\Windows8Detected
|
127 | 134 | Nonzero if Windows 8 (or later) is detected.
|
Index: cfgmgr/cfgmgr.cpp |
— | — | @@ -104,6 +104,24 @@ |
105 | 105 | }
|
106 | 106 | }
|
107 | 107 |
|
| 108 | +float ReadFloat(HKEY hKey, float original, float &mask, LPCTSTR value)
|
| 109 | +{
|
| 110 | + DWORD dwOut;
|
| 111 | + DWORD sizeout = 4;
|
| 112 | + DWORD regdword = REG_DWORD;
|
| 113 | + LSTATUS error = RegQueryValueEx(hKey,value,NULL,®dword,(LPBYTE)&dwOut,&sizeout);
|
| 114 | + if(error == ERROR_SUCCESS)
|
| 115 | + {
|
| 116 | + mask = 1.0f;
|
| 117 | + return dwOut;
|
| 118 | + }
|
| 119 | + else
|
| 120 | + {
|
| 121 | + mask = 0.0f;
|
| 122 | + return original;
|
| 123 | + }
|
| 124 | +}
|
| 125 | +
|
108 | 126 | void ReadPath(HKEY hKey, TCHAR *path, TCHAR *mask, LPCTSTR value)
|
109 | 127 | {
|
110 | 128 | DWORD sizeout = MAX_PATH*sizeof(TCHAR);
|
Index: cfgmgr/cfgmgr.h |
— | — | @@ -38,6 +38,7 @@ |
39 | 39 | DWORD TextureFormat;
|
40 | 40 | DWORD TexUpload;
|
41 | 41 | bool Windows8Detected;
|
| 42 | + float aspect;
|
42 | 43 | } DXGLCFG;
|
43 | 44 |
|
44 | 45 | void ReadSettings(HKEY hKey, DXGLCFG *cfg, DXGLCFG *mask, bool global, bool dll, LPTSTR dir);
|
Index: dxglcfg/dxglcfg.cpp |
— | — | @@ -284,6 +284,10 @@ |
285 | 285 | else mask[0] = 0xff;
|
286 | 286 | }
|
287 | 287 |
|
| 288 | +void SetAspectCombo(int item, float value)
|
| 289 | +{
|
| 290 | +}
|
| 291 | +
|
288 | 292 | LRESULT CALLBACK DXGLCfgCallback(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
289 | 293 | {
|
290 | 294 | PIXELFORMATDESCRIPTOR pfd =
|
— | — | @@ -420,6 +424,18 @@ |
421 | 425 | _tcscpy(buffer,_T("Shader (primary only)"));
|
422 | 426 | SendDlgItemMessage(hWnd,IDC_SCALE,CB_ADDSTRING,3,(LPARAM)buffer);
|
423 | 427 | SendDlgItemMessage(hWnd,IDC_SCALE,CB_SETCURSEL,cfg->scalingfilter,0);
|
| 428 | + // aspect
|
| 429 | + _tcscpy(buffer,_T("Default"));
|
| 430 | + SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 431 | + _tcscpy(buffer,_T("4:3"));
|
| 432 | + SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 433 | + _tcscpy(buffer,_T("16:10"));
|
| 434 | + SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 435 | + _tcscpy(buffer,_T("16:9"));
|
| 436 | + SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 437 | + _tcscpy(buffer,_T("5:4"));
|
| 438 | + SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 439 | +
|
424 | 440 | // highres
|
425 | 441 | if(cfg->highres) SendDlgItemMessage(hWnd,IDC_HIGHRES,BM_SETCHECK,BST_CHECKED,0);
|
426 | 442 | else SendDlgItemMessage(hWnd,IDC_HIGHRES,BM_SETCHECK,BST_UNCHECKED,0);
|
— | — | @@ -536,7 +552,7 @@ |
537 | 553 | EnableWindow(GetDlgItem(hWnd,IDC_MSAA),FALSE);
|
538 | 554 | cfg->msaa = 0;
|
539 | 555 | }
|
540 | | - // aspect
|
| 556 | + // aspect3d
|
541 | 557 | _tcscpy(buffer,_T("Stretch to display"));
|
542 | 558 | SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_ADDSTRING,0,(LPARAM)buffer);
|
543 | 559 | _tcscpy(buffer,_T("Expand viewable area"));
|
Index: dxglcfg/dxglcfg.rc |
— | — | @@ -44,7 +44,7 @@ |
45 | 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 | | - AUTOCHECKBOX "Change display color depth", IDC_COLOR, 299, 14, 100, 8
|
| 48 | + AUTOCHECKBOX "Change display color depth", IDC_COLOR, 299, 14, 100, 10
|
49 | 49 | LTEXT "Scaling method", IDC_STATIC, 195, 69, 49, 8, SS_LEFT
|
50 | 50 | COMBOBOX IDC_SCALE, 195, 79, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
51 | 51 | LTEXT "Vertical sync", IDC_STATIC, 299, 69, 41, 8, SS_LEFT
|
— | — | @@ -52,6 +52,10 @@ |
53 | 53 | LTEXT "Scaling shader", IDC_STATIC, 195, 94, 47, 8, SS_LEFT
|
54 | 54 | EDITTEXT IDC_SHADER, 195, 104, 183, 14, ES_AUTOHSCROLL
|
55 | 55 | PUSHBUTTON "...", IDC_BROWSESHADER, 379, 104, 20, 14
|
| 56 | + LTEXT "Screen aspect ratio", IDC_STATIC, 195, 120, 63, 8, SS_LEFT
|
| 57 | + LTEXT "DPI scaling mode", IDC_STATIC, 299, 120, 55, 8, SS_LEFT
|
| 58 | + COMBOBOX IDC_ASPECT, 195, 130, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS
|
| 59 | + COMBOBOX IDC_DPISCALE, 299, 130, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
56 | 60 | LTEXT "Texture filter", IDC_STATIC, 195, 145, 43, 8, SS_LEFT
|
57 | 61 | COMBOBOX IDC_TEXFILTER, 195, 155, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
58 | 62 | LTEXT "Anisotropic filtering", IDC_STATIC, 299, 145, 62, 8, SS_LEFT
|
— | — | @@ -69,10 +73,6 @@ |
70 | 74 | COMBOBOX IDC_TEXTUREFORMAT, 195, 205, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
71 | 75 | LTEXT "Texture access method", IDC_STATIC, 299, 195, 76, 8, SS_LEFT
|
72 | 76 | COMBOBOX IDC_TEXUPLOAD, 299, 205, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
73 | | - LTEXT "Screen aspect ratio", IDC_STATIC, 195, 120, 63, 8, SS_LEFT
|
74 | | - LTEXT "DPI scaling mode", IDC_STATIC, 299, 120, 55, 8, SS_LEFT
|
75 | | - COMBOBOX IDC_ASPECT, 195, 130, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
76 | | - COMBOBOX IDC_DPISCALE, 299, 130, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
77 | 77 | }
|
78 | 78 |
|
79 | 79 |
|