Merge pull request #657 from Nekokabu/master

Fix character corruption
This commit is contained in:
zilmar 2015-10-06 08:48:08 +11:00
commit 9704a1119f
4 changed files with 19 additions and 3 deletions

View File

@ -3601,6 +3601,7 @@ Internal Name=MARIO STORY
Status=Compatible
Plugin Note=[video] errors:menus (see GameFAQ)
32bit=No
Save Type=FlashRam
Clear Frame=1
Counter Factor=1
Culling=1
@ -4347,6 +4348,7 @@ Internal Name=PAPER MARIO
Status=Compatible
Plugin Note=[video] errors:menus (see GameFAQ)
32bit=No
Save Type=FlashRam
Clear Frame=1
Counter Factor=1
Culling=1
@ -4357,6 +4359,7 @@ Internal Name=PAPER MARIO
Status=Compatible
Plugin Note=[video] errors:menus (see GameFAQ)
32bit=No
Save Type=FlashRam
Clear Frame=1
Counter Factor=1
Culling=1

View File

@ -201,7 +201,7 @@ void CDMA::PI_DMA_WRITE()
return;
}
if ( g_Reg->PI_CART_ADDR_REG >= 0x10000000 && g_Reg->PI_CART_ADDR_REG <= 0x1FBFFFFF)
if ( g_Reg->PI_CART_ADDR_REG >= 0x10000000 && g_Reg->PI_CART_ADDR_REG <= 0x1FFFFFFF)
{
DWORD i;

View File

@ -699,7 +699,11 @@ void CMainMenu::FillOutMenu ( HMENU hMenu )
break;
}
stdstr_f MenuString("&%d %s",(count + 1) % 10,LastRom.c_str());
RecentRomMenu.push_back(MENU_ITEM(ID_RECENT_ROM_START + count,EMPTY_STRING,EMPTY_STDSTR,NULL,MenuString.ToUTF16().c_str()));
WCHAR *w_LastRom = new WCHAR[MenuString.length() + 1];
::mbstowcs(w_LastRom, MenuString.c_str(), MenuString.length() + 1);
RecentRomMenu.push_back(MENU_ITEM(ID_RECENT_ROM_START + count, EMPTY_STRING, EMPTY_STDSTR, NULL, w_LastRom));
delete w_LastRom;
}
@ -717,7 +721,11 @@ void CMainMenu::FillOutMenu ( HMENU hMenu )
}
stdstr_f MenuString("&%d %s",(count + 1) % 10,LastDir.c_str());
RecentDirMenu.push_back(MENU_ITEM(ID_RECENT_DIR_START + count,EMPTY_STRING,EMPTY_STDSTR,NULL,MenuString.ToUTF16().c_str()));
WCHAR *w_LastDir = new WCHAR[MenuString.length() + 1];
::mbstowcs(w_LastDir, MenuString.c_str(), MenuString.length() + 1);
RecentDirMenu.push_back(MENU_ITEM(ID_RECENT_DIR_START + count, EMPTY_STRING, EMPTY_STDSTR, NULL, w_LastDir));
delete w_LastDir;
}
/* File Menu

View File

@ -198,6 +198,11 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
{
FixDirectories();
char *lbuffer = new char[10];
if (GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SABBREVLANGNAME, lbuffer, 10))
setlocale(LC_ALL, lbuffer);
delete lbuffer;
CoInitialize(NULL);
try
{