diff --git a/Common/File/FileUtil.cpp b/Common/File/FileUtil.cpp index 0123851a48..91c0aee6b6 100644 --- a/Common/File/FileUtil.cpp +++ b/Common/File/FileUtil.cpp @@ -111,7 +111,7 @@ FILE *OpenCFile(const Path &path, const char *mode) { return nullptr; } return fdopen(descriptor, "rb"); - } else if (!strcmp(mode, "w") || !strcmp(mode, "wb") || !strcmp(mode, "wt")) { + } else if (!strcmp(mode, "w") || !strcmp(mode, "wb") || !strcmp(mode, "wt") || !strcmp(mode, "at") || !strcmp(mode, "a")) { // Need to be able to create the file here if it doesn't exist. // Not exactly sure which abstractions are best, let's start simple. if (!File::Exists(path)) { @@ -137,7 +137,12 @@ FILE *OpenCFile(const Path &path, const char *mode) { INFO_LOG(COMMON, "Opening '%s' for write failed", path.ToString().c_str()); return nullptr; } - return fdopen(descriptor, "wb"); + FILE *f = fdopen(descriptor, "wb"); + if (!strcmp(mode, "at") || !strcmp(mode, "a")) { + // Append mode. + fseek(f, 0, SEEK_END); + } + return f; } else { ERROR_LOG(COMMON, "OpenCFile(%s): Mode not yet supported: %s", path.c_str(), mode); return nullptr; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 4f987882cf..94d83c6223 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -987,7 +987,7 @@ void GameSettingsScreen::CreateViews() { systemSettings->Add(new CheckBox(&g_Config.bCacheFullIsoInRam, sy->T("Cache ISO in RAM", "Cache full ISO in RAM")))->SetEnabled(!PSP_IsInited()); #endif - systemSettings->Add(new ItemHeader(sy->T("Cheats", "Cheats (experimental, see forums)"))); + systemSettings->Add(new ItemHeader(sy->T("Cheats", "Cheats"))); CheckBox *enableCheats = systemSettings->Add(new CheckBox(&g_Config.bEnableCheats, sy->T("Enable Cheats"))); enableCheats->OnClick.Add([&](UI::EventParams &) { enableReportsCheckbox_->SetEnabled(Reporting::IsSupported()); diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index fd11d1ca5f..024b3d3f43 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -362,6 +362,7 @@ bool CreateDirectoriesAndroid() { return false; } + File::CreateFullPath(GetSysDirectory(DIRECTORY_CHEATS)); File::CreateFullPath(GetSysDirectory(DIRECTORY_SAVEDATA)); File::CreateFullPath(GetSysDirectory(DIRECTORY_SAVESTATE)); File::CreateFullPath(GetSysDirectory(DIRECTORY_GAME));