From 7b3e58b6655c2281c0160aa8ab6c8e67293ff9ad Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Thu, 20 Jan 2011 05:29:18 +0000 Subject: [PATCH] Fix an issue where additional gamecube controllers were configured and not saved when dolphin is translated. Fixes issue 3936. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6886 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/ConfigMain.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index 29809ce142..e9cc1a5f08 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -78,6 +78,8 @@ static const wxLanguage langIds[] = #define EXIDEV_AM_BB_STR _trans("AM-Baseboard") #define EXIDEV_GECKO_STR "USBGecko" +#define CSTR_TRANS(a) wxString(wxGetTranslation(wxT(a))).mb_str() + #ifdef WIN32 //only used with xgettext to be picked up as translatable string. //win32 does not have wx on its path, the provided wxALL_FILES @@ -1015,11 +1017,11 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA) void CConfigMain::ChooseSIDevice(std::string deviceName, int deviceNum) { TSIDevices tempType; - if (!deviceName.compare(SIDEV_STDCONT_STR)) + if (!deviceName.compare(CSTR_TRANS(SIDEV_STDCONT_STR))) tempType = SI_GC_CONTROLLER; else if (!deviceName.compare(SIDEV_GBA_STR)) tempType = SI_GBA; - else if (!deviceName.compare(SIDEV_AM_BB_STR)) + else if (!deviceName.compare(CSTR_TRANS(SIDEV_AM_BB_STR))) tempType = SI_AM_BASEBOARD; else tempType = SI_NONE; @@ -1037,17 +1039,17 @@ void CConfigMain::ChooseEXIDevice(std::string deviceName, int deviceNum) { TEXIDevices tempType; - if (!deviceName.compare(EXIDEV_MEMCARD_STR)) + if (!deviceName.compare(CSTR_TRANS(EXIDEV_MEMCARD_STR))) tempType = deviceNum ? EXIDEVICE_MEMORYCARD_B : EXIDEVICE_MEMORYCARD_A; - else if (!deviceName.compare(EXIDEV_MIC_STR)) + else if (!deviceName.compare(CSTR_TRANS(EXIDEV_MIC_STR))) tempType = EXIDEVICE_MIC; else if (!deviceName.compare(EXIDEV_BBA_STR)) tempType = EXIDEVICE_ETH; - else if (!deviceName.compare(EXIDEV_AM_BB_STR)) + else if (!deviceName.compare(CSTR_TRANS(EXIDEV_AM_BB_STR))) tempType = EXIDEVICE_AM_BASEBOARD; else if (!deviceName.compare(EXIDEV_GECKO_STR)) tempType = EXIDEVICE_GECKO; - else if (!deviceName.compare(DEV_NONE_STR)) + else if (!deviceName.compare(CSTR_TRANS(DEV_NONE_STR))) tempType = EXIDEVICE_NONE; else tempType = EXIDEVICE_DUMMY;