service: am: Set push in arguments according to the launched applet

This commit is contained in:
Narr the Reg 2023-09-28 23:01:25 -06:00
parent 03d4fffc70
commit ae5c134ac6
7 changed files with 120 additions and 17 deletions

View file

@ -2122,6 +2122,8 @@ void GMainWindow::OnEmulationStopped() {
OnTasStateChanged();
render_window->FinalizeCamera();
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::None);
// Enable all controllers
system->HIDCore().SetSupportedStyleTag({Core::HID::NpadStyleSet::All});
@ -4169,6 +4171,9 @@ void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) {
return;
}
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::Cabinet);
system->GetAppletManager().SetCabinetMode(mode);
const auto filename = QString::fromStdString(cabinet_nca->GetFullPath());
UISettings::values.roms_path = QFileInfo(filename).path();
BootGame(filename);
@ -4190,6 +4195,8 @@ void GMainWindow::OnMiiEdit() {
return;
}
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::MiiEdit);
const auto filename = QString::fromStdString((mii_applet_nca->GetFullPath()));
UISettings::values.roms_path = QFileInfo(filename).path();
BootGame(filename);