|
|
@ -47,6 +47,7 @@
|
|
|
|
#include "core/hle/service/am/applet_ae.h"
|
|
|
|
#include "core/hle/service/am/applet_ae.h"
|
|
|
|
#include "core/hle/service/am/applet_oe.h"
|
|
|
|
#include "core/hle/service/am/applet_oe.h"
|
|
|
|
#include "core/hle/service/am/applets/applets.h"
|
|
|
|
#include "core/hle/service/am/applets/applets.h"
|
|
|
|
|
|
|
|
#include "core/hle/service/set/set_sys.h"
|
|
|
|
#include "yuzu/multiplayer/state.h"
|
|
|
|
#include "yuzu/multiplayer/state.h"
|
|
|
|
#include "yuzu/util/controller_navigation.h"
|
|
|
|
#include "yuzu/util/controller_navigation.h"
|
|
|
|
|
|
|
|
|
|
|
@ -1048,7 +1049,12 @@ void GMainWindow::InitializeWidgets() {
|
|
|
|
statusBar()->addPermanentWidget(label);
|
|
|
|
statusBar()->addPermanentWidget(label);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TODO (flTobi): Add the widget when multiplayer is fully implemented
|
|
|
|
firmware_label = new QLabel();
|
|
|
|
|
|
|
|
firmware_label->setObjectName(QStringLiteral("FirmwareLabel"));
|
|
|
|
|
|
|
|
firmware_label->setVisible(false);
|
|
|
|
|
|
|
|
firmware_label->setFocusPolicy(Qt::NoFocus);
|
|
|
|
|
|
|
|
statusBar()->addPermanentWidget(firmware_label);
|
|
|
|
|
|
|
|
|
|
|
|
statusBar()->addPermanentWidget(multiplayer_state->GetStatusText(), 0);
|
|
|
|
statusBar()->addPermanentWidget(multiplayer_state->GetStatusText(), 0);
|
|
|
|
statusBar()->addPermanentWidget(multiplayer_state->GetStatusIcon(), 0);
|
|
|
|
statusBar()->addPermanentWidget(multiplayer_state->GetStatusIcon(), 0);
|
|
|
|
|
|
|
|
|
|
|
@ -2165,6 +2171,10 @@ void GMainWindow::OnEmulationStopped() {
|
|
|
|
emu_frametime_label->setVisible(false);
|
|
|
|
emu_frametime_label->setVisible(false);
|
|
|
|
renderer_status_button->setEnabled(!UISettings::values.has_broken_vulkan);
|
|
|
|
renderer_status_button->setEnabled(!UISettings::values.has_broken_vulkan);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!firmware_label->text().isEmpty()) {
|
|
|
|
|
|
|
|
firmware_label->setVisible(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
current_game_path.clear();
|
|
|
|
current_game_path.clear();
|
|
|
|
|
|
|
|
|
|
|
|
// When closing the game, destroy the GLWindow to clear the context after the game is closed
|
|
|
|
// When closing the game, destroy the GLWindow to clear the context after the game is closed
|
|
|
@ -4591,6 +4601,7 @@ void GMainWindow::UpdateStatusBar() {
|
|
|
|
emu_speed_label->setVisible(!Settings::values.use_multi_core.GetValue());
|
|
|
|
emu_speed_label->setVisible(!Settings::values.use_multi_core.GetValue());
|
|
|
|
game_fps_label->setVisible(true);
|
|
|
|
game_fps_label->setVisible(true);
|
|
|
|
emu_frametime_label->setVisible(true);
|
|
|
|
emu_frametime_label->setVisible(true);
|
|
|
|
|
|
|
|
firmware_label->setVisible(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::UpdateGPUAccuracyButton() {
|
|
|
|
void GMainWindow::UpdateGPUAccuracyButton() {
|
|
|
@ -4810,6 +4821,8 @@ void GMainWindow::OnReinitializeKeys(ReinitializeKeyBehavior behavior) {
|
|
|
|
"games."));
|
|
|
|
"games."));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetFirmwareVersion();
|
|
|
|
|
|
|
|
|
|
|
|
if (behavior == ReinitializeKeyBehavior::Warning) {
|
|
|
|
if (behavior == ReinitializeKeyBehavior::Warning) {
|
|
|
|
game_list->PopulateAsync(UISettings::values.game_dirs);
|
|
|
|
game_list->PopulateAsync(UISettings::values.game_dirs);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4837,7 +4850,7 @@ bool GMainWindow::CheckSystemArchiveDecryption() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool GMainWindow::CheckFirmwarePresence() {
|
|
|
|
bool GMainWindow::CheckFirmwarePresence() {
|
|
|
|
constexpr u64 MiiEditId = 0x0100000000001009ull;
|
|
|
|
constexpr u64 MiiEditId = static_cast<u64>(Service::AM::Applets::AppletProgramId::MiiEdit);
|
|
|
|
|
|
|
|
|
|
|
|
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
|
|
|
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
|
|
|
if (!bis_system) {
|
|
|
|
if (!bis_system) {
|
|
|
@ -4852,6 +4865,28 @@ bool GMainWindow::CheckFirmwarePresence() {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::SetFirmwareVersion() {
|
|
|
|
|
|
|
|
Service::Set::FirmwareVersionFormat firmware_data{};
|
|
|
|
|
|
|
|
const auto result = Service::Set::GetFirmwareVersionImpl(
|
|
|
|
|
|
|
|
firmware_data, *system, Service::Set::GetFirmwareVersionType::Version2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result.IsError() || !CheckFirmwarePresence()) {
|
|
|
|
|
|
|
|
LOG_INFO(Frontend, "Installed firmware: No firmware available");
|
|
|
|
|
|
|
|
firmware_label->setVisible(false);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
firmware_label->setVisible(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const std::string display_version(firmware_data.display_version.data());
|
|
|
|
|
|
|
|
const std::string display_title(firmware_data.display_title.data());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_INFO(Frontend, "Installed firmware: {}", display_title);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
firmware_label->setText(QString::fromStdString(display_version));
|
|
|
|
|
|
|
|
firmware_label->setToolTip(QString::fromStdString(display_title));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installed, u64 program_id,
|
|
|
|
bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installed, u64 program_id,
|
|
|
|
u64* selected_title_id, u8* selected_content_record_type) {
|
|
|
|
u64* selected_title_id, u8* selected_content_record_type) {
|
|
|
|
using ContentInfo = std::tuple<u64, FileSys::TitleType, FileSys::ContentRecordType>;
|
|
|
|
using ContentInfo = std::tuple<u64, FileSys::TitleType, FileSys::ContentRecordType>;
|
|
|
|