Modify and restore NVIDIA control panel settings
Namely: - Power profile for sunshine.exe - Global OpenGL/Vulkan DXGI swapchain
This commit is contained in:
parent
6992d424a8
commit
f245f777f7
15 changed files with 1174 additions and 4 deletions
|
|
@ -33,6 +33,8 @@
|
|||
#include "src/utility.h"
|
||||
#include <iterator>
|
||||
|
||||
#include "nvprefs/nvprefs_interface.h"
|
||||
|
||||
// UDP_SEND_MSG_SIZE was added in the Windows 10 20H1 SDK
|
||||
#ifndef UDP_SEND_MSG_SIZE
|
||||
#define UDP_SEND_MSG_SIZE 2
|
||||
|
|
@ -740,6 +742,16 @@ namespace platf {
|
|||
// Promote ourselves to high priority class
|
||||
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
|
||||
|
||||
// Modify NVIDIA control panel settings again, in case they have been changed externally since sunshine launch
|
||||
if (nvprefs_instance.load()) {
|
||||
if (!nvprefs_instance.owning_undo_file()) {
|
||||
nvprefs_instance.restore_from_and_delete_undo_file_if_exists();
|
||||
}
|
||||
nvprefs_instance.modify_application_profile();
|
||||
nvprefs_instance.modify_global_profile();
|
||||
nvprefs_instance.unload();
|
||||
}
|
||||
|
||||
// Enable low latency mode on all connected WLAN NICs if wlanapi.dll is available
|
||||
if (fn_WlanOpenHandle) {
|
||||
DWORD negotiated_version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue