From cd615ed9061a008fbf1e99f8aab89f653d25e80b Mon Sep 17 00:00:00 2001 From: "gregory.hainaut@gmail.com" Date: Sat, 5 Mar 2011 21:20:52 +0000 Subject: [PATCH] pcsx2 gui: (will love review and big test) * Really save the reg-setting (ie the plugigns folder path) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4392 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/AppConfig.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pcsx2/gui/AppConfig.cpp b/pcsx2/gui/AppConfig.cpp index dabff7e98b..c506ceb75a 100644 --- a/pcsx2/gui/AppConfig.cpp +++ b/pcsx2/gui/AppConfig.cpp @@ -1097,6 +1097,19 @@ static void SaveVmSettings() sApp.DispatchVmSettingsEvent( vmsaver ); } +static void SaveRegSettings() +{ + ScopedPtr conf_install; + + if (InstallationMode == InstallMode_Portable) return; + + // sApp. macro cannot be use because you need the return value of OpenInstallSettingsFile method + if( Pcsx2App* __app_ = (Pcsx2App*)wxApp::GetInstance() ) conf_install = (*__app_).OpenInstallSettingsFile(); + conf_install->SetRecordDefaults(false); + + App_SaveInstallSettings( conf_install ); +} + void AppSaveSettings() { // If multiple SaveSettings messages are requested, we want to ignore most of them. @@ -1116,6 +1129,7 @@ void AppSaveSettings() SaveUiSettings(); SaveVmSettings(); + SaveRegSettings(); // save register because of PluginsFolder change AtomicExchange( isPosted, false ); }