Create as UTF-8 format of new cwcheat file

Fix #4300
This commit is contained in:
sum2012 2015-01-27 19:54:22 +08:00
parent 1079c21e38
commit 7b3115e4de

View File

@ -13,6 +13,8 @@
#include "util/text/utf8.h"
#endif
using namespace std;
static int CheatEvent = -1;
std::string gameTitle;
std::string activeCheatFile;
@ -39,7 +41,11 @@ static void __CheatStart() {
File::CreateFullPath(GetSysDirectory(DIRECTORY_CHEATS));
if (!File::Exists(activeCheatFile)) {
File::CreateEmptyFile(activeCheatFile);
ofstream myCheatFile;
myCheatFile.open(activeCheatFile);
myCheatFile << "\xEF\xBB\xBF";
myCheatFile.close();
}
cheatEngine = new CWCheatEngine();