diff --git a/DDrawCompat/Config/Config.cpp b/DDrawCompat/Config/Config.cpp index 5c5e436..fd3796c 100644 --- a/DDrawCompat/Config/Config.cpp +++ b/DDrawCompat/Config/Config.cpp @@ -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; diff --git a/DDrawCompat/Config/Config.h b/DDrawCompat/Config/Config.h index 948627e..e50b5d1 100644 --- a/DDrawCompat/Config/Config.h +++ b/DDrawCompat/Config/Config.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -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; diff --git a/DDrawCompat/Config/Settings/ResolutionScaleFilter.h b/DDrawCompat/Config/Settings/ResolutionScaleFilter.h new file mode 100644 index 0000000..78b70fe --- /dev/null +++ b/DDrawCompat/Config/Settings/ResolutionScaleFilter.h @@ -0,0 +1,21 @@ +#pragma once + +#include + +namespace Config +{ + namespace Settings + { + class ResolutionScaleFilter : public MappedSetting + { + public: + static const UINT POINT = 0; + static const UINT BILINEAR = 1; + + ResolutionScaleFilter::ResolutionScaleFilter() + : MappedSetting("ResolutionScaleFilter", "point", { {"point", POINT}, {"bilinear", BILINEAR} }) + { + } + }; + } +} diff --git a/DDrawCompat/D3dDdi/Resource.cpp b/DDrawCompat/D3dDdi/Resource.cpp index 6f44947..3a3a8e3 100644 --- a/DDrawCompat/D3dDdi/Resource.cpp +++ b/DDrawCompat/D3dDdi/Resource.cpp @@ -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; diff --git a/DDrawCompat/DDrawCompat.vcxproj b/DDrawCompat/DDrawCompat.vcxproj index e7e605b..c83d42c 100644 --- a/DDrawCompat/DDrawCompat.vcxproj +++ b/DDrawCompat/DDrawCompat.vcxproj @@ -180,6 +180,7 @@ + diff --git a/DDrawCompat/DDrawCompat.vcxproj.filters b/DDrawCompat/DDrawCompat.vcxproj.filters index df60137..e6af4da 100644 --- a/DDrawCompat/DDrawCompat.vcxproj.filters +++ b/DDrawCompat/DDrawCompat.vcxproj.filters @@ -600,6 +600,9 @@ Header Files\Config\Settings + + Header Files\Config\Settings + diff --git a/DDrawCompat/Overlay/ConfigWindow.cpp b/DDrawCompat/Overlay/ConfigWindow.cpp index 64b8cbf..67c3c05 100644 --- a/DDrawCompat/Overlay/ConfigWindow.cpp +++ b/DDrawCompat/Overlay/ConfigWindow.cpp @@ -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); diff --git a/DDrawCompat/Overlay/SettingControl.h b/DDrawCompat/Overlay/SettingControl.h index a4471bc..bee9f2d 100644 --- a/DDrawCompat/Overlay/SettingControl.h +++ b/DDrawCompat/Overlay/SettingControl.h @@ -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;