mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix as @hrydgard suggest
This commit is contained in:
parent
dff76dec56
commit
008806c275
1 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,5 @@
|
|||
#include "i18n/i18n.h"
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/FileUtil.h"
|
||||
|
@ -13,7 +15,7 @@
|
|||
#include "util/text/utf8.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
static int CheatEvent = -1;
|
||||
std::string gameTitle;
|
||||
|
@ -41,10 +43,15 @@ static void __CheatStart() {
|
|||
File::CreateFullPath(GetSysDirectory(DIRECTORY_CHEATS));
|
||||
|
||||
if (!File::Exists(activeCheatFile)) {
|
||||
ofstream myCheatFile;
|
||||
myCheatFile.open(activeCheatFile.c_str());
|
||||
myCheatFile << "\xEF\xBB\xBF";
|
||||
myCheatFile.close();
|
||||
FILE *f = File::OpenCFile(activeCheatFile, "wb");
|
||||
if (f) {
|
||||
fwrite("\xEF\xBB\xBF", 1, 3, f);
|
||||
fclose(f);
|
||||
}
|
||||
if (!File::Exists(activeCheatFile)) {
|
||||
I18NCategory *err = GetI18NCategory("Error");
|
||||
osm.Show(err->T("Unable to create cheat file, disk may be full"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue