SteamTarget: fix "overlay_only_config"

v2
Peter Repukat 7 years ago
parent 500086cf68
commit a6eeec1a0a

@ -49,10 +49,9 @@ void SteamTarget::init()
loguru::add_file("last.log", loguru::Truncate, loguru::Verbosity_INFO);
connect(this, SIGNAL(aboutToQuit()), this, SLOT(onAboutToQuit()));
SetConsoleCtrlHandler(reinterpret_cast<PHANDLER_ROUTINE>(ConsoleCtrlCallback), true);
ShowWindow(GetConsoleWindow(), SW_HIDE);
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
readIni();
target_overlay_.init(!enable_overlay_);
target_overlay_.init(!enable_overlay_, enable_overlay_only_config_);
initOverlayEvents();
controller_thread_ = std::make_unique<VirtualControllerThread>(update_rate_);
if (enable_controllers_)

@ -58,7 +58,8 @@ void TargetOverlay::overlayLoop()
if (hidden_ || hidden_only_config_)
{
ShowWindow(window_.getSystemHandle(), SW_HIDE);
window_.setFramerateLimit(1); //Window is not shown anyway,
if (hidden_)
window_.setFramerateLimit(1); //Window is not shown anyway,
}
else
{
@ -84,7 +85,6 @@ void TargetOverlay::overlayLoop()
if (hidden_only_config_)
{
ShowWindow(window_.getSystemHandle(), SW_SHOW);
window_.setFramerateLimit(30);
}
@ -119,7 +119,6 @@ void TargetOverlay::overlayLoop()
if (hidden_only_config_)
{
ShowWindow(window_.getSystemHandle(), SW_HIDE);
window_.setFramerateLimit(1); //Window is not shown anyway
}
}

Loading…
Cancel
Save