From a93fe94afc232f3167ad00b36affa2109f95e8ed Mon Sep 17 00:00:00 2001 From: shenweip Date: Tue, 29 Oct 2013 01:41:48 +0800 Subject: [PATCH 1/3] Quick fix for savedata. --- Core/Dialog/SavedataParam.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index ad83a3c548..fad83d8626 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -1098,12 +1098,12 @@ int SavedataParam::SetPspParam(SceUtilitySavedataParam *param) for (int i = 0; i < saveDataListCount; i++) { // "<>" means saveName can be anything... if (strcmp(saveNameListData[i], "<>") == 0) { - std::string fileDataPath = ""; + std::string fileDataPath = ""; + // TODO:Maybe we need a way to reorder the files... auto allSaves = pspFileSystem.GetDirListing(savePath); std::string gameName = GetGameName(param); std::string saveName = ""; for(auto it = allSaves.begin(); it != allSaves.end(); ++it) { - if(strncmp(it->name.c_str(),gameName.c_str(),strlen(gameName.c_str())) == 0) { saveName = it->name.substr(strlen(gameName.c_str())); @@ -1118,9 +1118,8 @@ int SavedataParam::SetPspParam(SceUtilitySavedataParam *param) ++realCount; } else { if (listEmptyFile) { - ClearFileInfo(saveDataList[realCount], saveName); - DEBUG_LOG(SCEUTILITY,"Don't Exist"); - ++realCount; + // If file doesn't exist,we only skip... + continue; } } break; From e41d4598af3b2eee8d41310d709ba71ee436cf63 Mon Sep 17 00:00:00 2001 From: shenweip Date: Tue, 29 Oct 2013 02:14:39 +0800 Subject: [PATCH 2/3] Update comment. --- Core/Dialog/SavedataParam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index fad83d8626..a6cfe3a001 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -1099,7 +1099,7 @@ int SavedataParam::SetPspParam(SceUtilitySavedataParam *param) // "<>" means saveName can be anything... if (strcmp(saveNameListData[i], "<>") == 0) { std::string fileDataPath = ""; - // TODO:Maybe we need a way to reorder the files... + // TODO:Maybe we need a way to reorder the files? auto allSaves = pspFileSystem.GetDirListing(savePath); std::string gameName = GetGameName(param); std::string saveName = ""; From 64c40f75fc2b6c4802624bbf7d84266f101b9143 Mon Sep 17 00:00:00 2001 From: bhavin192 Date: Mon, 28 Oct 2013 22:58:08 +0530 Subject: [PATCH 3/3] Add back button to TiltAnalogSettingsScreen fixed up by hrydgard --- UI/GameSettingsScreen.cpp | 2 +- UI/TiltAnalogSettingsScreen.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 7c60eb2a23..c2d9b4e80c 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -215,7 +215,7 @@ void GameSettingsScreen::CreateViews() { controlsSettings->Add(new ItemHeader(ms->T("Controls"))); controlsSettings->Add(new Choice(c->T("Control Mapping")))->OnClick.Handle(this, &GameSettingsScreen::OnControlMapping); -#ifdef USING_GLES2 +#if defined(USING_GLES2) controlsSettings->Add(new CheckBox(&g_Config.bHapticFeedback, c->T("HapticFeedback", "Haptic Feedback (vibration)"))); controlsSettings->Add(new CheckBox(&g_Config.bAccelerometerToAnalogHoriz, c->T("Tilt", "Tilt to Analog (horizontal)"))); Choice *tiltAnalog = controlsSettings->Add(new Choice(c->T("Customize tilt"))); diff --git a/UI/TiltAnalogSettingsScreen.cpp b/UI/TiltAnalogSettingsScreen.cpp index a2e3649cd1..253f0c34e6 100644 --- a/UI/TiltAnalogSettingsScreen.cpp +++ b/UI/TiltAnalogSettingsScreen.cpp @@ -24,6 +24,7 @@ void TiltAnalogSettingsScreen::CreateViews() { using namespace UI; I18NCategory *c = GetI18NCategory("Controls"); + I18NCategory *d = GetI18NCategory("Dialog"); root_ = new ScrollView(ORIENT_VERTICAL); @@ -49,6 +50,8 @@ void TiltAnalogSettingsScreen::CreateViews() { settings->Add(calibrate); root_->Add(settings); + settings->Add(new ItemHeader("")); + settings->Add(new Choice(d->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); } void TiltAnalogSettingsScreen::update(InputState &input) {