mirror of https://github.com/PCSX2/pcsx2.git
windows: Don't log errors for PS2EsetEmuVersion
On wxWidgets3.0, using GetSymbol() on a nonexistent symbol causes error messages to be logged. This causes all plugins except GSdx to output error messages when an attempt to load the PS2EsetEmuVersion symbol fails. Suppress the error message - it'll probably just cause unnecessary confusion.
This commit is contained in:
parent
db6a32ac33
commit
837046218e
|
@ -855,19 +855,22 @@ SysCorePlugins::PluginStatus_t::PluginStatus_t( PluginsEnum_t _pid, const wxStri
|
|||
|
||||
_PS2EgetLibName GetLibName = (_PS2EgetLibName) Lib.GetSymbol( L"PS2EgetLibName" );
|
||||
_PS2EgetLibVersion2 GetLibVersion2 = (_PS2EgetLibVersion2) Lib.GetSymbol( L"PS2EgetLibVersion2" );
|
||||
#ifdef __linux__
|
||||
_PS2EsetEmuVersion SetEmuVersion = NULL;
|
||||
#else
|
||||
_PS2EsetEmuVersion SetEmuVersion = (_PS2EsetEmuVersion) Lib.GetSymbol( L"PS2EsetEmuVersion" );
|
||||
#endif
|
||||
|
||||
if( GetLibName == NULL || GetLibVersion2 == NULL )
|
||||
throw Exception::PluginLoadError( pid ).SetStreamName(Filename)
|
||||
.SetDiagMsg(L"%s plugin init failed: Method binding failure on GetLibName or GetLibVersion2.")
|
||||
.SetUserMsg(_( "The configured %s plugin is not a PCSX2 plugin, or is for an older unsupported version of PCSX2."));
|
||||
|
||||
if( SetEmuVersion != NULL )
|
||||
SetEmuVersion("PCSX2", (PCSX2_VersionHi << 24) | (PCSX2_VersionMid << 16) | (PCSX2_VersionLo << 8) | 0);
|
||||
// Only Windows GSdx uses this. Should be removed in future after GSdx no longer relies on it to show the new config dialog.
|
||||
#ifdef _WIN32
|
||||
// Since only Windows Gsdx has this symbol, that means every other plugin is going to cause error messages to be logged.
|
||||
// Let's not do that for a hack function.
|
||||
if (Lib.HasSymbol(L"PS2EsetEmuVersion")) {
|
||||
_PS2EsetEmuVersion SetEmuVersion = (_PS2EsetEmuVersion)Lib.GetSymbol(L"PS2EsetEmuVersion");
|
||||
if (SetEmuVersion)
|
||||
SetEmuVersion("PCSX2", (PCSX2_VersionHi << 24) | (PCSX2_VersionMid << 16) | (PCSX2_VersionLo << 8) | 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
Name = fromUTF8( GetLibName() );
|
||||
int version = GetLibVersion2( tbl_PluginInfo[pid].typemask );
|
||||
|
|
Loading…
Reference in New Issue