Merge pull request #7384 from sum2012/Gamesetting

Fix unicode letters in PPSSPP folder in installed.txt
This commit is contained in:
Henrik Rydgård 2015-02-04 15:31:51 +01:00
commit 68cb7cb21a

View file

@ -671,11 +671,14 @@ UI::EventReturn GameSettingsScreen::OnSavePathOther(UI::EventParams &e) {
I18NCategory *di = GetI18NCategory("Dialog");
std::string folder = W32Util::BrowseForFolder(MainWindow::GetHWND(), di->T("Choose PPSSPP save folder"));
if (folder.size()) {
ofstream myfile;
g_Config.memStickDirectory = folder;
myfile.open(PPSSPPpath + "installed.txt");
myfile << "\xEF\xBB\xBF" + folder;
myfile.close();
FILE *f = File::OpenCFile(PPSSPPpath + "installed.txt", "wb");
if (f) {
std::string utfstring("\xEF\xBB\xBF");
utfstring.append(folder);
fwrite(utfstring.c_str(), 1, utfstring.length(), f);
fclose(f);
}
installed_ = false;
}
else