steam_helper: Clear IsUnavailable for EA Desktop if set.

CW-Bug-Id: #22321
This commit is contained in:
Paul Gofman 2023-06-13 13:02:18 -06:00 committed by Arkadiusz Hiler
parent 727f81d380
commit 6d51ed29f3

View file

@ -1177,11 +1177,26 @@ run:
if (use_shell_execute && lstrlenW(cmdline) > 10 && !memcmp(cmdline, L"link2ea://", 10 *sizeof(WCHAR)))
{
HDESK desktop = GetThreadDesktop(GetCurrentThreadId());
DWORD is_unavailable, type, size;
DWORD timeout = 3000;
HKEY eakey;
link2ea = TRUE;
if (!SetUserObjectInformationA(desktop, 1000, &timeout, sizeof(timeout)))
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");