libobs-d3d11: Set maximum GPU priority

(This commit also modifies the UI)

This solves the issue where OBS would be deprioritized by Windows over
fullscreen games, causing OBS to lag out whereas the games would still
run fine.
This commit is contained in:
jp9000
2019-10-07 02:23:46 -07:00
parent cda7f3e3fd
commit ec769ef008
4 changed files with 108 additions and 0 deletions

View File

@@ -1911,6 +1911,18 @@ static void load_debug_privilege(void)
NULL);
}
if (!!LookupPrivilegeValue(NULL, SE_INC_BASE_PRIORITY_NAME, &val)) {
tp.PrivilegeCount = 1;
tp.Privileges[0].Luid = val;
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if (!AdjustTokenPrivileges(token, false, &tp, sizeof(tp), NULL,
NULL)) {
blog(LOG_INFO, "Could not set privilege to "
"increase GPU priority");
}
}
CloseHandle(token);
}
#endif