mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-27 22:18:21 +03:00
steam_helper: Clear IsUnavailable for EA Desktop if set.
CW-Bug-Id: #22321
This commit is contained in:
parent
727f81d380
commit
6d51ed29f3
@ -1177,11 +1177,26 @@ run:
|
|||||||
if (use_shell_execute && lstrlenW(cmdline) > 10 && !memcmp(cmdline, L"link2ea://", 10 *sizeof(WCHAR)))
|
if (use_shell_execute && lstrlenW(cmdline) > 10 && !memcmp(cmdline, L"link2ea://", 10 *sizeof(WCHAR)))
|
||||||
{
|
{
|
||||||
HDESK desktop = GetThreadDesktop(GetCurrentThreadId());
|
HDESK desktop = GetThreadDesktop(GetCurrentThreadId());
|
||||||
|
DWORD is_unavailable, type, size;
|
||||||
DWORD timeout = 3000;
|
DWORD timeout = 3000;
|
||||||
|
HKEY eakey;
|
||||||
|
|
||||||
link2ea = TRUE;
|
link2ea = TRUE;
|
||||||
if (!SetUserObjectInformationA(desktop, 1000, &timeout, sizeof(timeout)))
|
if (!SetUserObjectInformationA(desktop, 1000, &timeout, sizeof(timeout)))
|
||||||
WINE_ERR("Failed to set desktop timeout, err %u.\n", GetLastError());
|
WINE_ERR("Failed to set desktop timeout, err %u.\n", GetLastError());
|
||||||
|
|
||||||
|
if (!RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Electronic Arts\\EA Desktop", 0, KEY_ALL_ACCESS, &eakey))
|
||||||
|
{
|
||||||
|
size = sizeof(is_unavailable);
|
||||||
|
if (!RegQueryValueExW(eakey, L"IsUnavailable", NULL, &type, (BYTE *)&is_unavailable, &size)
|
||||||
|
&& type == REG_DWORD && is_unavailable)
|
||||||
|
{
|
||||||
|
WINE_ERR("EA Desktop\\IsUnavailable is set, clearing.\n");
|
||||||
|
is_unavailable = 0;
|
||||||
|
RegSetValueExW(eakey, L"IsUnavailable", 0, REG_DWORD, (BYTE *)&is_unavailable, sizeof(is_unavailable));
|
||||||
|
}
|
||||||
|
RegCloseKey(eakey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
hide_window = env_nonzero("PROTON_HIDE_PROCESS_WINDOW");
|
hide_window = env_nonzero("PROTON_HIDE_PROCESS_WINDOW");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user