mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-26 11:45:26 +00:00
Fix as @hrydgard suggest
This commit is contained in:
parent
dff76dec56
commit
008806c275
@ -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…
x
Reference in New Issue
Block a user