diff --git a/DDrawCompat/Config/Config.cpp b/DDrawCompat/Config/Config.cpp index fd3796c..c310ea5 100644 --- a/DDrawCompat/Config/Config.cpp +++ b/DDrawCompat/Config/Config.cpp @@ -28,6 +28,7 @@ namespace Config Settings::SpriteDetection spriteDetection; Settings::SpriteFilter spriteFilter; Settings::SpriteTexCoord spriteTexCoord; + Settings::StatsHotKey statsHotKey; Settings::SupportedResolutions supportedResolutions; Settings::TextureFilter textureFilter; Settings::ThreadPriorityBoost threadPriorityBoost; diff --git a/DDrawCompat/Config/Config.h b/DDrawCompat/Config/Config.h index e50b5d1..7b2771c 100644 --- a/DDrawCompat/Config/Config.h +++ b/DDrawCompat/Config/Config.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,7 @@ namespace Config extern Settings::SpriteDetection spriteDetection; extern Settings::SpriteFilter spriteFilter; extern Settings::SpriteTexCoord spriteTexCoord; + extern Settings::StatsHotKey statsHotKey; extern Settings::SupportedResolutions supportedResolutions; extern Settings::TextureFilter textureFilter; extern Settings::ThreadPriorityBoost threadPriorityBoost; diff --git a/DDrawCompat/Config/Settings/StatsHotKey.h b/DDrawCompat/Config/Settings/StatsHotKey.h new file mode 100644 index 0000000..f8c959a --- /dev/null +++ b/DDrawCompat/Config/Settings/StatsHotKey.h @@ -0,0 +1,15 @@ +#pragma once + +#include + +namespace Config +{ + namespace Settings + { + class StatsHotKey : public HotKeySetting + { + public: + StatsHotKey() : HotKeySetting("StatsHotKey", "shift+f12") {} + }; + } +} diff --git a/DDrawCompat/DDrawCompat.vcxproj b/DDrawCompat/DDrawCompat.vcxproj index cef928f..7f27339 100644 --- a/DDrawCompat/DDrawCompat.vcxproj +++ b/DDrawCompat/DDrawCompat.vcxproj @@ -185,6 +185,7 @@ + diff --git a/DDrawCompat/DDrawCompat.vcxproj.filters b/DDrawCompat/DDrawCompat.vcxproj.filters index 6155081..4a94e93 100644 --- a/DDrawCompat/DDrawCompat.vcxproj.filters +++ b/DDrawCompat/DDrawCompat.vcxproj.filters @@ -627,6 +627,9 @@ Header Files\Overlay + + Header Files\Config\Settings + diff --git a/DDrawCompat/Overlay/StatsWindow.cpp b/DDrawCompat/Overlay/StatsWindow.cpp index 7a6ddc2..db2d19b 100644 --- a/DDrawCompat/Overlay/StatsWindow.cpp +++ b/DDrawCompat/Overlay/StatsWindow.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -66,7 +67,7 @@ namespace Overlay { StatsWindow::StatsWindow() : Window(nullptr, { 0, 0, StatsControl::NAME_LABEL_WIDTH + 4 * StatsControl::VALUE_LABEL_WIDTH, 105 + BORDER }, - 0, Input::parseHotKey("shift+f12")) + 0, Config::statsHotKey.get()) { addControl("", [](StatsQueue::TickCount) { return std::array{ "cur", "avg", "min", "max" }; }, WS_VISIBLE | WS_DISABLED).update(0);