From 4577f2f0a5f62896e40c1431ca666bc80890bea2 Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Sat, 6 Jun 2015 00:42:53 +0100 Subject: [PATCH 1/3] Fix for old GSDX config GUI showing. during 1st time config. --- pcsx2/gui/Panels/PluginSelectorPanel.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index 8ccaa39a64..49543bd87e 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -653,6 +653,17 @@ void Panels::PluginSelectorPanel::OnConfigure_Clicked( wxCommandEvent& evt ) { func( GetLogFolder().ToString().mb_str(wxConvFile) ); } + + //FIX for GSDX loading old config GUI, Code taken from PluginManager.cpp +#ifdef __linux__ + _PS2EsetEmuVersion SetEmuVersion = NULL; +#else + _PS2EsetEmuVersion SetEmuVersion = (_PS2EsetEmuVersion)dynlib.GetSymbol(L"PS2EsetEmuVersion"); +#endif + + if (SetEmuVersion != NULL) + SetEmuVersion("PCSX2", (0ul << 24) | (9ul << 16) | (7ul << 8) | 0); + } configfunc(); From b7ad408773ae723a70a5cc9279b341caac2bb8e7 Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Sat, 6 Jun 2015 11:17:42 +0100 Subject: [PATCH 2/3] SetEmuVersion, pass actual PCSX2 version --- pcsx2/PluginManager.cpp | 2 +- pcsx2/gui/Panels/PluginSelectorPanel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcsx2/PluginManager.cpp b/pcsx2/PluginManager.cpp index 95b94a1e25..5d0c7640fe 100644 --- a/pcsx2/PluginManager.cpp +++ b/pcsx2/PluginManager.cpp @@ -865,7 +865,7 @@ SysCorePlugins::PluginStatus_t::PluginStatus_t( PluginsEnum_t _pid, const wxStri .SetUserMsg(_( "The configured %s plugin is not a PCSX2 plugin, or is for an older unsupported version of PCSX2.")); if( SetEmuVersion != NULL ) - SetEmuVersion( "PCSX2", (0ul << 24) | (9ul<<16) | (7ul<<8) | 0 ); + SetEmuVersion("PCSX2", (PCSX2_VersionHi << 24) | (PCSX2_VersionMid << 16) | (PCSX2_VersionLo << 8) | 0); Name = fromUTF8( GetLibName() ); int version = GetLibVersion2( tbl_PluginInfo[pid].typemask ); diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index 49543bd87e..ce4be2ea03 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -662,7 +662,7 @@ void Panels::PluginSelectorPanel::OnConfigure_Clicked( wxCommandEvent& evt ) #endif if (SetEmuVersion != NULL) - SetEmuVersion("PCSX2", (0ul << 24) | (9ul << 16) | (7ul << 8) | 0); + SetEmuVersion("PCSX2", (PCSX2_VersionHi << 24) | (PCSX2_VersionMid << 16) | (PCSX2_VersionLo << 8) | 0); } From 93a9ba8b6f904fc60896efbbc54cab9f22adb978 Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Sat, 6 Jun 2015 12:09:19 +0100 Subject: [PATCH 3/3] Use CorePlugins to load plugins during FT Config --- pcsx2/gui/Panels/PluginSelectorPanel.cpp | 33 +++++++----------------- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index ce4be2ea03..3412e15ab8 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -642,31 +642,16 @@ void Panels::PluginSelectorPanel::OnConfigure_Clicked( wxCommandEvent& evt ) ScopedCoreThreadPause paused_core( new SysExecEvent_SaveSinglePlugin(pid) ); if (!CorePlugins.AreLoaded()) { - typedef void (CALLBACK* SetDirFnptr)( const char* dir ); - - if( SetDirFnptr func = (SetDirFnptr)dynlib.GetSymbol( tbl_PluginInfo[pid].GetShortname() + L"setSettingsDir" ) ) - { - func( GetSettingsFolder().ToString().mb_str(wxConvFile) ); - } - - if( SetDirFnptr func = (SetDirFnptr)dynlib.GetSymbol( tbl_PluginInfo[pid].GetShortname() + L"setLogDir" ) ) - { - func( GetLogFolder().ToString().mb_str(wxConvFile) ); - } - - //FIX for GSDX loading old config GUI, Code taken from PluginManager.cpp -#ifdef __linux__ - _PS2EsetEmuVersion SetEmuVersion = NULL; -#else - _PS2EsetEmuVersion SetEmuVersion = (_PS2EsetEmuVersion)dynlib.GetSymbol(L"PS2EsetEmuVersion"); -#endif - - if (SetEmuVersion != NULL) - SetEmuVersion("PCSX2", (PCSX2_VersionHi << 24) | (PCSX2_VersionMid << 16) | (PCSX2_VersionLo << 8) | 0); - + CorePlugins.Load(pid, filename); + CorePlugins.SendLogFolder(); + CorePlugins.SendSettingsFolder(); + configfunc(); + CorePlugins.Unload(pid); + } + else + { + configfunc(); } - - configfunc(); } }