Android: Scale down selected background images when too large. Fix activity issue.

This commit is contained in:
Henrik Rydgård committed 2026-03-08 14:53:20 +01:00
1 parent 5a27f20387
commit d596e43b4b
4 files changed
+97 -14

No files matched your search

+6 -1
View File
@@ -1659,8 +1659,13 @@ void GameSettingsScreen::OnChangeBackground(UI::EventParams &e) {
}
if (!filename.empty()) {
Path src(value);
Path dest = GetSysDirectory(DIRECTORY_SYSTEM) / filename;
File::Copy(Path(value), dest);
File::Copy(src, dest);
if (src.FilePathContainsNoCase("temp_import.jpg")) {
INFO_LOG(Log::UI, "Deleting temp file: %s", GetFriendlyPath(src).c_str());
File::Delete(src);
}
} else {
g_OSD.Show(OSDType::MESSAGE_ERROR, sy->T("Only JPG and PNG images are supported"), path.GetFilename(), 5.0);
}