| Index: cfgmgr/ReadMe.txt |
| — | — | @@ -142,11 +142,30 @@ |
| 143 | 143 | INI Entry ScalingFilter
|
| 144 | 144 | INI Group scaling
|
| 145 | 145 | REG_DWORD HKCU\DXGL\Profiles\<app>\ScalingFilter
|
| 146 | | -Filter to use for stretched 2D blits and the final display scaling.
|
| | 146 | +Filter to use for display scaling.
|
| 147 | 147 | Valid settings:
|
| 148 | 148 | 0 - Nearest-neighbor stretching
|
| 149 | 149 | 1 - Bilinear interpolation
|
| 150 | 150 |
|
| | 151 | +Member BltScale
|
| | 152 | +INI Entry BltScale
|
| | 153 | +INI Group scaling
|
| | 154 | +REG_DWORD HKCU\DXGL\Profiles\<app>\BltScale
|
| | 155 | +Filter to use for Blt scaling.
|
| | 156 | +Valid settings:
|
| | 157 | +0 - Nearest-neighbor stretching
|
| | 158 | +1 - Bilinear interpolation
|
| | 159 | +2 - Bilinear interpolation, sharp color key
|
| | 160 | +3 - Bilinear interpolation, soft color key
|
| | 161 | +
|
| | 162 | +Member BltThreshold
|
| | 163 | +INI Entry BltThreshold
|
| | 164 | +INI Group scaling
|
| | 165 | +REG_DWORD HKCU\DXGL\Profiles\<app>\BltThreshold
|
| | 166 | +Threshold point for sharp color key scaling.
|
| | 167 | +Default is 127.
|
| | 168 | +Valid settings are 0 to 254, 255 will be accepted but disable color keying.
|
| | 169 | +
|
| 151 | 170 | Member primaryscale
|
| 152 | 171 | INI Entry AdjustPrimaryResolution
|
| 153 | 172 | INI Group scaling
|
| Index: cfgmgr/cfgmgr.c |
| — | — | @@ -540,6 +540,8 @@ |
| 541 | 541 | cfg->postsizey = ReadFloatWithObsolete(hKey, cfg->postsizey, &cfgmask->postsizey, _T("PostprocessScaleY"),
|
| 542 | 542 | 1, _T("FirstScaleY"));
|
| 543 | 543 | cfg->scalingfilter = ReadDWORD(hKey,cfg->scalingfilter,&cfgmask->scalingfilter,_T("ScalingFilter"));
|
| | 544 | + cfg->BltScale = ReadDWORD(hKey, cfg->BltScale, &cfgmask->BltScale, _T("BltScale"));
|
| | 545 | + cfg->BltThreshold = ReadDWORD(hKey, cfg->BltThreshold, &cfgmask->BltThreshold, _T("BltThreshold"));
|
| 544 | 546 | cfg->texfilter = ReadDWORD(hKey,cfg->texfilter,&cfgmask->texfilter,_T("TextureFilter"));
|
| 545 | 547 | cfg->anisotropic = ReadDWORD(hKey,cfg->anisotropic,&cfgmask->anisotropic,_T("AnisotropicFiltering"));
|
| 546 | 548 | cfg->msaa = ReadDWORD(hKey,cfg->msaa,&cfgmask->msaa,_T("Antialiasing"));
|
| — | — | @@ -660,6 +662,8 @@ |
| 661 | 663 | defaultmask.aspect = 1.0f;
|
| 662 | 664 | defaultmask.postsizex = 1.0f;
|
| 663 | 665 | defaultmask.postsizey = 1.0f;
|
| | 666 | + defaultmask.DisplayMultiplierX = 1.0f;
|
| | 667 | + defaultmask.DisplayMultiplierY = 1.0f;
|
| 664 | 668 | WriteDWORD(hKey,cfg->scaler,cfgmask->scaler,_T("ScalingMode"));
|
| 665 | 669 | WriteDWORD(hKey, cfg->fullmode, cfgmask->fullmode, _T("FullscreenWindowMode"));
|
| 666 | 670 | WriteBool(hKey,cfg->colormode,cfgmask->colormode,_T("ChangeColorDepth"));
|
| — | — | @@ -670,6 +674,8 @@ |
| 671 | 675 | WriteFloatDeleteObsolete(hKey, cfg->postsizey, cfgmask->postsizey, _T("PostprocessScaleY"),
|
| 672 | 676 | 1, _T("FirstScaleY"));
|
| 673 | 677 | WriteDWORD(hKey,cfg->scalingfilter,cfgmask->scalingfilter,_T("ScalingFilter"));
|
| | 678 | + WriteDWORD(hKey, cfg->BltScale, cfgmask->BltScale, _T("BltScale"));
|
| | 679 | + WriteDWORD(hKey, cfg->BltThreshold, cfgmask->BltThreshold, _T("BltThreshold"));
|
| 674 | 680 | WriteDWORD(hKey,cfg->texfilter,cfgmask->texfilter,_T("TextureFilter"));
|
| 675 | 681 | WriteDWORD(hKey,cfg->anisotropic,cfgmask->anisotropic,_T("AnisotropicFiltering"));
|
| 676 | 682 | WriteDWORD(hKey,cfg->msaa,cfgmask->msaa,_T("Antialiasing"));
|
| — | — | @@ -796,6 +802,12 @@ |
| 797 | 803 | ZeroMemory(cfg, sizeof(DXGLCFG));
|
| 798 | 804 | cfg->DPIScale = 1;
|
| 799 | 805 | cfg->AddModes = 1;
|
| | 806 | + cfg->CustomResolutionX = 640;
|
| | 807 | + cfg->CustomResolutionY = 480;
|
| | 808 | + cfg->CustomRefresh = 60;
|
| | 809 | + cfg->DisplayMultiplierX = 1.0f;
|
| | 810 | + cfg->DisplayMultiplierY = 1.0f;
|
| | 811 | + cfg->BltThreshold = 127;
|
| 800 | 812 | if (!cfg->Windows8Detected)
|
| 801 | 813 | {
|
| 802 | 814 | OSVERSIONINFO osver;
|
| — | — | @@ -896,6 +908,8 @@ |
| 897 | 909 | if (!stricmp(section, "scaling"))
|
| 898 | 910 | {
|
| 899 | 911 | if (!stricmp(name, "ScalingFilter")) cfg->scalingfilter = INIIntValue(value);
|
| | 912 | + if (!stricmp(name, "BltScale")) cfg->BltScale = INIIntValue(value);
|
| | 913 | + if (!stricmp(name, "BltThreshold")) cfg->BltThreshold = INIIntValue(value);
|
| 900 | 914 | if (!stricmp(name, "AdjustPrimaryResolution")) cfg->primaryscale = INIIntValue(value);
|
| 901 | 915 | if (!stricmp(name, "PrimaryScaleX")) cfg->primaryscalex = INIFloatValue(value);
|
| 902 | 916 | if (!stricmp(name, "PrimaryScaleY")) cfg->primaryscaley = INIFloatValue(value);
|
| Index: cfgmgr/cfgmgr.h |
| — | — | @@ -42,6 +42,8 @@ |
| 43 | 43 | float DisplayMultiplierY;
|
| 44 | 44 | // [scaling]
|
| 45 | 45 | DWORD scalingfilter;
|
| | 46 | + DWORD BltScale;
|
| | 47 | + DWORD BltThreshold;
|
| 46 | 48 | DWORD primaryscale;
|
| 47 | 49 | float primaryscalex;
|
| 48 | 50 | float primaryscaley;
|
| Index: dxgl-example.ini |
| — | — | @@ -187,6 +187,23 @@ |
| 188 | 188 | ; 1 - Bilinear interpolation
|
| 189 | 189 | ScalingFilter = 0
|
| 190 | 190 |
|
| | 191 | +; BltScale - Integer
|
| | 192 | +; Selects the filter to be used to scale Blt operations.
|
| | 193 | +; Default is 0
|
| | 194 | +; The following values are valid:
|
| | 195 | +; 0 - Nearest-neighbor stretching
|
| | 196 | +; 1 - Bilinear interpolation
|
| | 197 | +; 2 - Bilinear interpolation, sharp color key
|
| | 198 | +; 3 - Bilinear interpolation, soft color key
|
| | 199 | +BltScale = 0
|
| | 200 | +
|
| | 201 | +; BltThreshold - Integer
|
| | 202 | +; Sets the threshold point for sharp color key scaling.
|
| | 203 | +; 0 will trim the most, 254 will trim the least, and 255 will completely
|
| | 204 | +; disable color keying.
|
| | 205 | +; Default is 127
|
| | 206 | +BltThreshold = 127
|
| | 207 | +
|
| 191 | 208 | ; AdjustPrimaryResolution - Integer
|
| 192 | 209 | ; Determines whether or not to resize the buffers used to hold the primary
|
| 193 | 210 | ; buffers if scaling is enabled. Enabling this may cause graphical glitches
|