Unable to edit existing profiles of existing applications
Swedeachu opened this issue · 0 comments
So I am currently stuck on an issue where I am unable to edit the profiles of existing games, or at least I don't know how to, as I was only able to figure out how to create new profiles and for new applications.
var session = NvAPIWrapper.DRS.DriverSettingsSession.CreateAndLoad(); // create a new session
var profile = NvAPIWrapper.DRS.DriverSettingsProfile.CreateProfile(session, "Minecraft"); // create a profile for Minecraft
var application = NvAPIWrapper.DRS.ProfileApplication.CreateApplication(profile, "Minecraft.Windows"); // the Minecraft Application
application.Profile.SetSetting(0X00DE429A, 0x00000000); // 0X00DE429A = Hex Setting ID of Raytracing - (DXR), set it to 0x0 (false)
application.Profile.Session.Save();
But as shown in this code I do not want to make an entire new profile, just edit the one called Minecraft for the Minecraft.Windows application. Hopefully this screenshot from nspector helps explain what I mean.
Also, is there anything else I should do after I save the session? I don't want to leave any resource leaks behind in the nvidia driver after run time.
If it isn't obvious already I am fumbling around a lot and I am not even entirely sure if I am setting the profile settings correctly, so please do correct any other portions of my code if needed.