/// <summary> /// Created in Program, instantiated by GuiInitializer. /// Finds the Batman: Arkham Asylum Profile or creates it if it doesn't exist yet. /// Calls getNVSettings(). /// </summary> public NvidiaWorker() { NVIDIA.Initialize(); logger.Debug("Constructor - NVIDIA API initialized."); _session = DriverSettingsSession.CreateAndLoad(); try { _session.FindProfileByName("Batman: Arkham Asylum"); } catch (NVIDIAApiException e) { Console.WriteLine(e); DriverSettingsProfile profile = DriverSettingsProfile.CreateProfile(_session, "Batman: Arkham Asylum", null); ProfileApplication profApp = ProfileApplication.CreateApplication(profile, "shippingpc-bmgame.exe"); profile = profApp.Profile; profile.SetSetting(KnownSettingId.AmbientOcclusionModeActive, 0); profile.SetSetting(KnownSettingId.AmbientOcclusionMode, 0); _session.Save(); logger.Warn("Constructor - NVIDIA profile not found. Creating profile: {0}", profile.ToString()); } _prof = _session.FindProfileByName("Batman: Arkham Asylum"); getNVSettings(); logger.Info("Constructor - NVIDIA profile fully processed."); }