Skip to content

Commit 846b955

Browse files
committed
improved fix
1 parent e169246 commit 846b955

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/BackupCell.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,16 @@ void BackupCell::DeleteMe(CCObject* object){
153153
}
154154

155155
void BackupCell::LoadBackup(CCObject* object){
156+
std::string message = "";
157+
#ifdef GEODE_IS_ANDROID
158+
message = "Are you sure you want\nto apply \"" + Name + "\"? \nthis backup will replace your\n current save.\nthis will also close down your game.";
159+
#else
160+
message = "Are you sure you want\nto apply \"" + Name + "\"? \nthis backup will replace your\n current save.\nthis will also restart your game.";
161+
#endif
156162
loadWarning = FLAlertLayer::create(
157163
this,
158164
"Warning!",
159-
"Are you sure you want\nto apply \"" + Name + "\"? \nthis backup will replace your\n current save.\nthis will also close down your game.",
165+
message.c_str(),
160166
"No",
161167
"Yes"
162168
);
@@ -189,6 +195,11 @@ void BackupCell::FLAlert_Clicked(FLAlertLayer* p0, bool p1){
189195
res = geode::utils::file::writeString(GDAPPDATAPATH / "CCLocalLevels.dat", geode::utils::file::readString(_folderPath / "CCLocalLevels.dat").value());
190196
res = geode::utils::file::writeString(GDAPPDATAPATH / "CCLocalLevels2.dat", geode::utils::file::readString(_folderPath / "CCLocalLevels2.dat").value());
191197

198+
#ifdef GEODE_IS_ANDROID
199+
#else
200+
game::restart();
201+
#endif
202+
192203
exit(0);
193204
}
194205
}

0 commit comments

Comments
 (0)