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
This commit is contained in:
Glenn Rice 2011-01-20 05:29:18 +00:00
parent bf2bb00f63
commit 7b3e58b665
1 changed files with 8 additions and 6 deletions

View File

@ -78,6 +78,8 @@ static const wxLanguage langIds[] =
#define EXIDEV_AM_BB_STR _trans("AM-Baseboard") #define EXIDEV_AM_BB_STR _trans("AM-Baseboard")
#define EXIDEV_GECKO_STR "USBGecko" #define EXIDEV_GECKO_STR "USBGecko"
#define CSTR_TRANS(a) wxString(wxGetTranslation(wxT(a))).mb_str()
#ifdef WIN32 #ifdef WIN32
//only used with xgettext to be picked up as translatable string. //only used with xgettext to be picked up as translatable string.
//win32 does not have wx on its path, the provided wxALL_FILES //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) void CConfigMain::ChooseSIDevice(std::string deviceName, int deviceNum)
{ {
TSIDevices tempType; TSIDevices tempType;
if (!deviceName.compare(SIDEV_STDCONT_STR)) if (!deviceName.compare(CSTR_TRANS(SIDEV_STDCONT_STR)))
tempType = SI_GC_CONTROLLER; tempType = SI_GC_CONTROLLER;
else if (!deviceName.compare(SIDEV_GBA_STR)) else if (!deviceName.compare(SIDEV_GBA_STR))
tempType = SI_GBA; 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; tempType = SI_AM_BASEBOARD;
else else
tempType = SI_NONE; tempType = SI_NONE;
@ -1037,17 +1039,17 @@ void CConfigMain::ChooseEXIDevice(std::string deviceName, int deviceNum)
{ {
TEXIDevices tempType; TEXIDevices tempType;
if (!deviceName.compare(EXIDEV_MEMCARD_STR)) if (!deviceName.compare(CSTR_TRANS(EXIDEV_MEMCARD_STR)))
tempType = deviceNum ? EXIDEVICE_MEMORYCARD_B : EXIDEVICE_MEMORYCARD_A; 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; tempType = EXIDEVICE_MIC;
else if (!deviceName.compare(EXIDEV_BBA_STR)) else if (!deviceName.compare(EXIDEV_BBA_STR))
tempType = EXIDEVICE_ETH; 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; tempType = EXIDEVICE_AM_BASEBOARD;
else if (!deviceName.compare(EXIDEV_GECKO_STR)) else if (!deviceName.compare(EXIDEV_GECKO_STR))
tempType = EXIDEVICE_GECKO; tempType = EXIDEVICE_GECKO;
else if (!deviceName.compare(DEV_NONE_STR)) else if (!deviceName.compare(CSTR_TRANS(DEV_NONE_STR)))
tempType = EXIDEVICE_NONE; tempType = EXIDEVICE_NONE;
else else
tempType = EXIDEVICE_DUMMY; tempType = EXIDEVICE_DUMMY;