1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Added ResolutionScaleFilter setting

This commit is contained in:
narzoul 2022-09-24 15:48:46 +02:00
parent 13e4d90116
commit c7ee5206d8
8 changed files with 34 additions and 4 deletions

View File

@ -23,6 +23,7 @@ namespace Config
Settings::RemoveBorders removeBorders;
Settings::RenderColorDepth renderColorDepth;
Settings::ResolutionScale resolutionScale;
Settings::ResolutionScaleFilter resolutionScaleFilter;
Settings::SoftwareDevice softwareDevice;
Settings::SpriteDetection spriteDetection;
Settings::SpriteFilter spriteFilter;

View File

@ -21,6 +21,7 @@
#include <Config/Settings/RemoveBorders.h>
#include <Config/Settings/RenderColorDepth.h>
#include <Config/Settings/ResolutionScale.h>
#include <Config/Settings/ResolutionScaleFilter.h>
#include <Config/Settings/SoftwareDevice.h>
#include <Config/Settings/SpriteDetection.h>
#include <Config/Settings/SpriteFilter.h>
@ -54,6 +55,7 @@ namespace Config
extern Settings::RemoveBorders removeBorders;
extern Settings::RenderColorDepth renderColorDepth;
extern Settings::ResolutionScale resolutionScale;
extern Settings::ResolutionScaleFilter resolutionScaleFilter;
extern Settings::SoftwareDevice softwareDevice;
extern Settings::SpriteDetection spriteDetection;
extern Settings::SpriteFilter spriteFilter;

View File

@ -0,0 +1,21 @@
#pragma once
#include <Config/MappedSetting.h>
namespace Config
{
namespace Settings
{
class ResolutionScaleFilter : public MappedSetting<UINT>
{
public:
static const UINT POINT = 0;
static const UINT BILINEAR = 1;
ResolutionScaleFilter::ResolutionScaleFilter()
: MappedSetting("ResolutionScaleFilter", "point", { {"point", POINT}, {"bilinear", BILINEAR} })
{
}
};
}
}

View File

@ -921,7 +921,8 @@ namespace D3dDdi
if (m_lockData[subResourceIndex].isMsaaUpToDate || m_lockData[subResourceIndex].isMsaaResolvedUpToDate)
{
loadMsaaResolvedResource(subResourceIndex);
if (!m_fixedData.Flags.RenderTarget)
if (!m_fixedData.Flags.RenderTarget ||
Config::Settings::ResolutionScaleFilter::POINT == Config::resolutionScaleFilter.get())
{
copySubResource(*this, *m_msaaResolvedSurface.resource, subResourceIndex);
return;

View File

@ -180,6 +180,7 @@
<ClInclude Include="Config\Settings\RemoveBorders.h" />
<ClInclude Include="Config\Settings\RenderColorDepth.h" />
<ClInclude Include="Config\Settings\ResolutionScale.h" />
<ClInclude Include="Config\Settings\ResolutionScaleFilter.h" />
<ClInclude Include="Config\Settings\SoftwareDevice.h" />
<ClInclude Include="Config\Settings\SpriteDetection.h" />
<ClInclude Include="Config\Settings\SpriteFilter.h" />

View File

@ -600,6 +600,9 @@
<ClInclude Include="Config\Settings\SoftwareDevice.h">
<Filter>Header Files\Config\Settings</Filter>
</ClInclude>
<ClInclude Include="Config\Settings\ResolutionScaleFilter.h">
<Filter>Header Files\Config\Settings</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Gdi\Gdi.cpp">

View File

@ -17,7 +17,7 @@ namespace
namespace Overlay
{
ConfigWindow::ConfigWindow()
: Window(nullptr, { 0, 0, SettingControl::TOTAL_WIDTH, 405 }, Config::configHotKey.get())
: Window(nullptr, { 0, 0, SettingControl::TOTAL_WIDTH, 430 }, Config::configHotKey.get())
, m_buttonCount(0)
, m_focus(nullptr)
{
@ -35,6 +35,7 @@ namespace Overlay
addControl(Config::fpsLimiter);
addControl(Config::renderColorDepth);
addControl(Config::resolutionScale);
addControl(Config::resolutionScaleFilter);
addControl(Config::spriteDetection);
addControl(Config::spriteFilter);
addControl(Config::spriteTexCoord);

View File

@ -20,8 +20,8 @@ namespace Overlay
public:
static const int PARAM_LABEL_WIDTH = 70;
static const int PARAM_CONTROL_WIDTH = 241;
static const int SETTING_LABEL_WIDTH = 120;
static const int SETTING_CONTROL_WIDTH = 151;
static const int SETTING_LABEL_WIDTH = 130;
static const int SETTING_CONTROL_WIDTH = 141;
static const int TOTAL_WIDTH =
SETTING_LABEL_WIDTH + SETTING_CONTROL_WIDTH + PARAM_LABEL_WIDTH + PARAM_CONTROL_WIDTH + BORDER;