Rollback android save onstop change for now

This commit is contained in:
Yousef Khadadeh 2026-05-18 09:45:17 +03:00
parent 35d2a03406
commit c07871337c
14 changed files with 19 additions and 48 deletions

View file

@ -476,7 +476,7 @@ void World::autosave_to_directory(const std::filesystem::path& directoryToSaveAt
save_to_file(directoryToSaveAt / std::filesystem::path(nameToSaveUnder + "." + FILE_EXTENSION));
}
void World::save_to_file(const std::filesystem::path& filePathToSaveAt, bool saveThumbnailIfAvailable) {
void World::save_to_file(const std::filesystem::path& filePathToSaveAt) {
try {
filePath = filePathToSaveAt;
@ -508,7 +508,7 @@ void World::save_to_file(const std::filesystem::path& filePathToSaveAt, bool sav
#else
if(!SDL_SaveFile(filePath.string().c_str(), f.view().data(), f.view().size()))
throw std::runtime_error("SDL_SaveFile failed with error: " + std::string(SDL_GetError()));
else if(saveThumbnail && saveThumbnailIfAvailable) {
else if(saveThumbnail) {
Vector2f imageCenter{main.window.size.x() * 0.5f, main.window.size.y() * 0.5f};
float imageDim = std::max(main.window.size.x(), main.window.size.y());
Vector2f imageDimVec{imageDim * 0.5f, imageDim * 0.5f};