mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-31 19:47:06 +01:00
GameManager translated install errors when storing them, and the install screens then looked the translated text up again as a key. It now stores the category and key, and translates when asked. The raw ISO install error gets the existing "Installation failed" string. Some other errors went around as strings that were then used as keys: - A missing savestate file now has its own error code, ERROR_FILE_MISSING, instead of a key in the failure reason. - The PKG reader's reasons are technical English, so they're now shown untranslated under the translated "This PKG file isn't a PSP game update". - The netconf dialog looked up the channel number. Only "Auto" is translated now, using the WLAN Channel setting's string. - Adds the missing "Failed to read old directory" for memstick moves. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
67 lines
2.2 KiB
C++
67 lines
2.2 KiB
C++
// Copyright (c) 2026- PPSSPP Project.
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
// Official git repository and contact information can be found at
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
#pragma once
|
|
|
|
#include "Common/File/Path.h"
|
|
#include "Common/UI/Notice.h"
|
|
#include "Common/UI/UIScreen.h"
|
|
#include "Common/UI/View.h"
|
|
|
|
#include "Core/Util/PkgUnpack.h"
|
|
#include "UI/BaseScreens.h"
|
|
#include "UI/SimpleDialogScreen.h"
|
|
|
|
// Offers to install a PSP game update from a .pkg file, the way InstallZipScreen does for zips.
|
|
// The package goes into PSP/GAME/<DISC_ID>, and from then on booting that disc runs the update -
|
|
// see FindGameUpdatePBOOT() in Core/PSPLoaders.cpp.
|
|
class InstallPkgScreen : public UITwoPaneBaseDialogScreen {
|
|
public:
|
|
InstallPkgScreen(const Path &pkgPath);
|
|
|
|
void update() override;
|
|
bool key(const KeyInput &key) override;
|
|
|
|
const char *tag() const override { return "InstallPkg"; }
|
|
|
|
protected:
|
|
void CreateSettingsViews(UI::ViewGroup *parent) override;
|
|
void CreateContentViews(UI::ViewGroup *parent) override;
|
|
std::string_view GetTitle() const override;
|
|
ViewLayoutMode LayoutMode() const override {
|
|
return ViewLayoutMode::ApplyInsets;
|
|
}
|
|
|
|
private:
|
|
void OnInstall(UI::EventParams ¶ms);
|
|
|
|
Path pkgPath_;
|
|
Path destination_;
|
|
|
|
PkgInfo pkgInfo_;
|
|
std::string pkgError_; // Why the package can't be read, if it can't. Untranslated.
|
|
bool canInstall_ = false;
|
|
u64 installSize_ = 0;
|
|
s64 freeSpace_ = -1; // Negative if we couldn't find out.
|
|
bool alreadyInstalled_ = false;
|
|
|
|
UI::Choice *installChoice_ = nullptr;
|
|
NoticeView *doneView_ = nullptr;
|
|
bool installStarted_ = false;
|
|
bool deletePkgFile_ = false;
|
|
};
|