Optionalize pause on focus lost
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
#include <windows.h>
|
||||
#include <vector>
|
||||
#include <chrono>
|
||||
#include "../FileSystem/ConfigFile.h"
|
||||
#include "../framework.h"
|
||||
|
||||
namespace TLAC::Components
|
||||
{
|
||||
@@ -91,6 +93,10 @@ namespace TLAC::Components
|
||||
panelState = (TouchPanelState*)TASK_TOUCH_ADDRESS;
|
||||
componentsManager = manager;
|
||||
|
||||
TLAC::FileSystem::ConfigFile config(TLAC::framework::GetModuleDirectory(), "keyconfig.ini");
|
||||
config.OpenRead();
|
||||
autoPause = config.GetBooleanValue("autopause");
|
||||
|
||||
saveOldPatchOps();
|
||||
|
||||
DetourTransactionBegin();
|
||||
@@ -537,7 +543,7 @@ namespace TLAC::Components
|
||||
|
||||
void Pause::OnFocusLost()
|
||||
{
|
||||
if (isInGame())
|
||||
if (isInGame() && autoPause)
|
||||
pause = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user