mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Added FontAntialiasing setting
This commit is contained in:
parent
32f9e7296d
commit
027b52686e
@ -14,6 +14,7 @@ namespace Config
|
|||||||
Settings::DisplayRefreshRate displayRefreshRate;
|
Settings::DisplayRefreshRate displayRefreshRate;
|
||||||
Settings::DisplayResolution displayResolution;
|
Settings::DisplayResolution displayResolution;
|
||||||
Settings::DpiAwareness dpiAwareness;
|
Settings::DpiAwareness dpiAwareness;
|
||||||
|
Settings::FontAntialiasing fontAntialiasing;
|
||||||
Settings::ForceD3D9On12 forceD3D9On12;
|
Settings::ForceD3D9On12 forceD3D9On12;
|
||||||
Settings::FpsLimiter fpsLimiter;
|
Settings::FpsLimiter fpsLimiter;
|
||||||
Settings::FullscreenMode fullscreenMode;
|
Settings::FullscreenMode fullscreenMode;
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include <Config/Settings/DisplayRefreshRate.h>
|
#include <Config/Settings/DisplayRefreshRate.h>
|
||||||
#include <Config/Settings/DisplayResolution.h>
|
#include <Config/Settings/DisplayResolution.h>
|
||||||
#include <Config/Settings/DpiAwareness.h>
|
#include <Config/Settings/DpiAwareness.h>
|
||||||
|
#include <Config/Settings/FontAntialiasing.h>
|
||||||
#include <Config/Settings/ForceD3D9On12.h>
|
#include <Config/Settings/ForceD3D9On12.h>
|
||||||
#include <Config/Settings/FpsLimiter.h>
|
#include <Config/Settings/FpsLimiter.h>
|
||||||
#include <Config/Settings/FullscreenMode.h>
|
#include <Config/Settings/FullscreenMode.h>
|
||||||
@ -42,6 +43,7 @@ namespace Config
|
|||||||
extern Settings::DisplayRefreshRate displayRefreshRate;
|
extern Settings::DisplayRefreshRate displayRefreshRate;
|
||||||
extern Settings::DisplayResolution displayResolution;
|
extern Settings::DisplayResolution displayResolution;
|
||||||
extern Settings::DpiAwareness dpiAwareness;
|
extern Settings::DpiAwareness dpiAwareness;
|
||||||
|
extern Settings::FontAntialiasing fontAntialiasing;
|
||||||
extern Settings::ForceD3D9On12 forceD3D9On12;
|
extern Settings::ForceD3D9On12 forceD3D9On12;
|
||||||
extern Settings::FpsLimiter fpsLimiter;
|
extern Settings::FpsLimiter fpsLimiter;
|
||||||
extern Settings::FullscreenMode fullscreenMode;
|
extern Settings::FullscreenMode fullscreenMode;
|
||||||
|
22
DDrawCompat/Config/Settings/FontAntialiasing.h
Normal file
22
DDrawCompat/Config/Settings/FontAntialiasing.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <Config/EnumSetting.h>
|
||||||
|
|
||||||
|
namespace Config
|
||||||
|
{
|
||||||
|
namespace Settings
|
||||||
|
{
|
||||||
|
class FontAntialiasing : public MappedSetting<UINT>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static const UINT APP = 0;
|
||||||
|
static const UINT OFF = 1;
|
||||||
|
static const UINT ON = 2;
|
||||||
|
|
||||||
|
FontAntialiasing()
|
||||||
|
: MappedSetting("FontAntialiasing", "app", { {"app", APP}, {"off", OFF}, {"on", ON} })
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@ -171,6 +171,7 @@
|
|||||||
<ClInclude Include="Config\Settings\DisplayRefreshRate.h" />
|
<ClInclude Include="Config\Settings\DisplayRefreshRate.h" />
|
||||||
<ClInclude Include="Config\Settings\DisplayResolution.h" />
|
<ClInclude Include="Config\Settings\DisplayResolution.h" />
|
||||||
<ClInclude Include="Config\Settings\DpiAwareness.h" />
|
<ClInclude Include="Config\Settings\DpiAwareness.h" />
|
||||||
|
<ClInclude Include="Config\Settings\FontAntialiasing.h" />
|
||||||
<ClInclude Include="Config\Settings\ForceD3D9On12.h" />
|
<ClInclude Include="Config\Settings\ForceD3D9On12.h" />
|
||||||
<ClInclude Include="Config\Settings\FpsLimiter.h" />
|
<ClInclude Include="Config\Settings\FpsLimiter.h" />
|
||||||
<ClInclude Include="Config\Settings\FullscreenMode.h" />
|
<ClInclude Include="Config\Settings\FullscreenMode.h" />
|
||||||
|
@ -582,6 +582,9 @@
|
|||||||
<ClInclude Include="Common\ScopedThreadPriority.h">
|
<ClInclude Include="Common\ScopedThreadPriority.h">
|
||||||
<Filter>Header Files\Common</Filter>
|
<Filter>Header Files\Common</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Config\Settings\FontAntialiasing.h">
|
||||||
|
<Filter>Header Files\Config\Settings</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Gdi\Gdi.cpp">
|
<ClCompile Include="Gdi\Gdi.cpp">
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <Common/Hook.h>
|
#include <Common/Hook.h>
|
||||||
#include <Common/Log.h>
|
#include <Common/Log.h>
|
||||||
|
#include <Config/Config.h>
|
||||||
#include <Gdi/Font.h>
|
#include <Gdi/Font.h>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@ -45,7 +46,8 @@ namespace Gdi
|
|||||||
{
|
{
|
||||||
Mapper::Mapper(HDC dc) : m_dc(dc), m_origFont(nullptr)
|
Mapper::Mapper(HDC dc) : m_dc(dc), m_origFont(nullptr)
|
||||||
{
|
{
|
||||||
if (!dc || g_isFontSmoothingEnabled)
|
if (!dc || Config::Settings::FontAntialiasing::ON == Config::fontAntialiasing.get() ||
|
||||||
|
g_isFontSmoothingEnabled && Config::Settings::FontAntialiasing::APP == Config::fontAntialiasing.get())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ namespace
|
|||||||
namespace Overlay
|
namespace Overlay
|
||||||
{
|
{
|
||||||
ConfigWindow::ConfigWindow()
|
ConfigWindow::ConfigWindow()
|
||||||
: Window(nullptr, { 0, 0, SettingControl::TOTAL_WIDTH, 380 }, Config::configHotKey.get())
|
: Window(nullptr, { 0, 0, SettingControl::TOTAL_WIDTH, 405 }, Config::configHotKey.get())
|
||||||
, m_buttonCount(0)
|
, m_buttonCount(0)
|
||||||
, m_focus(nullptr)
|
, m_focus(nullptr)
|
||||||
{
|
{
|
||||||
@ -31,6 +31,7 @@ namespace Overlay
|
|||||||
addControl(Config::bltFilter);
|
addControl(Config::bltFilter);
|
||||||
addControl(Config::antialiasing);
|
addControl(Config::antialiasing);
|
||||||
addControl(Config::displayFilter);
|
addControl(Config::displayFilter);
|
||||||
|
addControl(Config::fontAntialiasing);
|
||||||
addControl(Config::fpsLimiter);
|
addControl(Config::fpsLimiter);
|
||||||
addControl(Config::renderColorDepth);
|
addControl(Config::renderColorDepth);
|
||||||
addControl(Config::resolutionScale);
|
addControl(Config::resolutionScale);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user