mirror of https://github.com/PCSX2/pcsx2.git
Fix string handling on Windows wxWidgets 3.0
This commit is contained in:
parent
cde4670cbd
commit
8de94a3714
|
@ -21,12 +21,16 @@
|
|||
|
||||
#include <wx/tokenzr.h>
|
||||
|
||||
#if _WIN32
|
||||
#define WX_STR(str) (str.wc_str())
|
||||
#else
|
||||
// Stupid wx3.0 doesn't support c_str for vararg function
|
||||
#if wxMAJOR_VERSION >= 3
|
||||
#define WX_STR(str) (static_cast<const char*>(str.c_str()))
|
||||
#else
|
||||
#define WX_STR(str) (str.c_str())
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// pxToUTF8
|
||||
|
|
|
@ -26,11 +26,11 @@ bool pxIsEnglish( int id )
|
|||
// --------------------------------------------------------------------------------------
|
||||
const wxChar* __fastcall pxExpandMsg( const wxChar* englishContent )
|
||||
{
|
||||
#if wxMAJOR_VERSION >= 3
|
||||
#if _WIN32 || wxMAJOR_VERSION < 3
|
||||
return wxGetTranslation(englishContent);
|
||||
#else
|
||||
wxString translation = wxGetTranslation( englishContent );
|
||||
return translation.wc_str();
|
||||
#else
|
||||
return wxGetTranslation( englishContent );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -50,10 +50,10 @@ const wxChar* __fastcall pxGetTranslation( const wxChar* message )
|
|||
Console.WriteLn( Color_Green, L"Message: %s", message );
|
||||
}
|
||||
}
|
||||
#if wxMAJOR_VERSION >= 3
|
||||
#if _WIN32 || wxMAJOR_VERSION < 3
|
||||
return wxGetTranslation(message);
|
||||
#else
|
||||
wxString translation = wxGetTranslation( message );
|
||||
return translation.wc_str();
|
||||
#else
|
||||
return wxGetTranslation( message );
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue