Hack to prevent thread from corrupting config
Following previous reverts, fixes a number of isses with ConfigFile, and prevents the hotkey thread from potentially corrupting the config file. The user will no longer be able to update these two settings in real time, but at this point I'd rather spend time on the new version rather than make fixes that require too much time.master
parent
521a90585a
commit
34f088cf32
|
@ -811,8 +811,17 @@ void OBSAPIInterface::HandleHotkeys()
|
|||
{
|
||||
List<DWORD> hitKeys;
|
||||
|
||||
bool allow_other_hotkey_modifiers = !!GlobalConfig->GetInt(TEXT("General"), TEXT("AllowOtherHotkeyModifiers"), true);
|
||||
bool uplay_overlay_compatibility = !!GlobalConfig->GetInt(L"General", L"UplayOverlayCompatibility", false);
|
||||
static bool allow_other_hotkey_modifiers;
|
||||
static bool uplay_overlay_compatibility;
|
||||
static bool set_vars = false;
|
||||
|
||||
/* only query these config variables once */
|
||||
if (!set_vars)
|
||||
{
|
||||
allow_other_hotkey_modifiers = !!GlobalConfig->GetInt(TEXT("General"), TEXT("AllowOtherHotkeyModifiers"), true);
|
||||
uplay_overlay_compatibility = !!GlobalConfig->GetInt(L"General", L"UplayOverlayCompatibility", false);
|
||||
set_vars = true;
|
||||
}
|
||||
|
||||
DWORD modifiers = 0;
|
||||
if(GetAsyncKeyState(VK_MENU) & 0x8000)
|
||||
|
|
Loading…
Reference in New Issue