diff --git a/common/include/Utilities/StringHelpers.h b/common/include/Utilities/StringHelpers.h index d71cdfbfa0..874db63973 100644 --- a/common/include/Utilities/StringHelpers.h +++ b/common/include/Utilities/StringHelpers.h @@ -21,12 +21,16 @@ #include +#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(str.c_str())) #else #define WX_STR(str) (str.c_str()) #endif +#endif // -------------------------------------------------------------------------------------- // pxToUTF8 diff --git a/common/src/Utilities/pxTranslate.cpp b/common/src/Utilities/pxTranslate.cpp index f579a2a757..aba039ea5a 100644 --- a/common/src/Utilities/pxTranslate.cpp +++ b/common/src/Utilities/pxTranslate.cpp @@ -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 }