fix character corruption

fix Recent Dir & ROM
This commit is contained in:
Nekokabu 2015-10-03 13:38:40 +09:00
parent 118134766c
commit 1d68f0bf35
1 changed files with 10 additions and 2 deletions

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