forked from eden-emu/eden
Merge pull request #11473 from liamwhite/fix-launch-param
am: Implement UserChannel parameters
This commit is contained in:
commit
9a0ea90018
10 changed files with 70 additions and 35 deletions
|
@ -1705,7 +1705,8 @@ void GMainWindow::AllowOSSleep() {
|
|||
#endif
|
||||
}
|
||||
|
||||
bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t program_index) {
|
||||
bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t program_index,
|
||||
AmLaunchType launch_type) {
|
||||
// Shutdown previous session if the emu thread is still active...
|
||||
if (emu_thread != nullptr) {
|
||||
ShutdownGame();
|
||||
|
@ -1717,6 +1718,10 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p
|
|||
|
||||
system->SetFilesystem(vfs);
|
||||
|
||||
if (launch_type == AmLaunchType::UserInitiated) {
|
||||
system->GetUserChannel().clear();
|
||||
}
|
||||
|
||||
system->SetAppletFrontendSet({
|
||||
std::make_unique<QtAmiiboSettings>(*this), // Amiibo Settings
|
||||
(UISettings::values.controller_applet_disabled.GetValue() == true)
|
||||
|
@ -1856,7 +1861,7 @@ void GMainWindow::ConfigureFilesystemProvider(const std::string& filepath) {
|
|||
}
|
||||
|
||||
void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t program_index,
|
||||
StartGameType type) {
|
||||
StartGameType type, AmLaunchType launch_type) {
|
||||
LOG_INFO(Frontend, "yuzu starting...");
|
||||
StoreRecentFile(filename); // Put the filename on top of the list
|
||||
|
||||
|
@ -1900,7 +1905,7 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
|
|||
}
|
||||
}
|
||||
|
||||
if (!LoadROM(filename, program_id, program_index)) {
|
||||
if (!LoadROM(filename, program_id, program_index, launch_type)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3369,7 +3374,8 @@ void GMainWindow::OnLoadComplete() {
|
|||
|
||||
void GMainWindow::OnExecuteProgram(std::size_t program_index) {
|
||||
ShutdownGame();
|
||||
BootGame(last_filename_booted, 0, program_index);
|
||||
BootGame(last_filename_booted, 0, program_index, StartGameType::Normal,
|
||||
AmLaunchType::ApplicationInitiated);
|
||||
}
|
||||
|
||||
void GMainWindow::OnExit() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue