[qt] frontend abstraction and message box early handling

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-07-23 21:10:17 -04:00
parent f4e7e759b7
commit 02860a7a47
Signed by untrusted user: crueter
GPG key ID: 425ACD2D4830EBC6
8 changed files with 136 additions and 47 deletions

View file

@ -13,7 +13,6 @@
#include <core/file_sys/vfs/vfs_real.h>
namespace QtCommon {
static constexpr std::array<const char *, 3> METADATA_RESULTS = {
"The operation completed successfully.",
"The metadata cache couldn't be deleted. It might be in use or non-existent.",
@ -41,15 +40,14 @@ inline constexpr const char *GetResetMetadataResultString(MetadataResult result)
return METADATA_RESULTS.at(static_cast<std::size_t>(result));
}
static constexpr std::array<const char *, 6> FIRMWARE_RESULTS = {
"",
"",
"Unable to locate potential firmware NCA files",
"Failed to delete one or more firmware files.",
"One or more firmware files failed to copy into NAND.",
"Firmware installation cancelled, firmware may be in a bad state or corrupted."
"Restart Eden or re-install firmware."
};
static constexpr std::array<const char *, 6> FIRMWARE_RESULTS
= {"Successfully installed firmware version %1",
"",
"Unable to locate potential firmware NCA files",
"Failed to delete one or more firmware files.",
"One or more firmware files failed to copy into NAND.",
"Firmware installation cancelled, firmware may be in a bad state or corrupted."
"Restart Eden or re-install firmware."};
enum class FirmwareInstallResult {
Success,
@ -60,11 +58,13 @@ enum class FirmwareInstallResult {
FailedCorrupted,
};
FirmwareInstallResult InstallFirmware(const QString &location,
bool recursive,
std::function<bool(std::size_t, std::size_t)> QtProgressCallback,
Core::System *system,
FileSys::VfsFilesystem *vfs);
FirmwareInstallResult InstallFirmware(
const QString &location,
bool recursive,
std::function<bool(std::size_t, std::size_t)> QtProgressCallback,
Core::System *system,
FileSys::VfsFilesystem *vfs,
QWidget *parent = nullptr);
QString UnzipFirmwareToTmp(const QString &location);
@ -75,8 +75,6 @@ inline constexpr const char *GetFirmwareInstallResultString(FirmwareInstallResul
Core::Frontend::WindowSystemType GetWindowSystemType();
Core::Frontend::EmuWindow::WindowSystemInfo GetWindowSystemInfo(QWindow* window);
Core::Frontend::EmuWindow::WindowSystemInfo GetWindowSystemInfo(QWindow *window);
} // namespace QtCommon
#endif