Compare commits

...

3 Commits

Author SHA1 Message Date
Aaron Dewes c2f7a02390 Merge branch 'AaronDewes-dev-patch-28634' into 'dev'
Use new Discord link

See merge request suyu-emu/suyu!98
2024-03-09 01:44:25 +00:00
niansa 16e19b0b3c Implement option to start QLaunch from Tools menu 2024-03-09 01:28:33 +00:00
Aaron Dewes 8f4be2baaa Use new Discord link 2024-03-08 19:06:07 +00:00
6 changed files with 51 additions and 6 deletions

View File

@ -24,7 +24,7 @@ It is written in C++ with portability in mind, and we actively maintain builds f
</h4>
<p align="center">
<a href="https://discord.gg/2gQRBp44KT">Discord</a> |
<a href="https://discord.gg/suyu">Discord</a> |
<a href="#status">Status</a> |
<a href="#development">Development</a> |
<a href="#downloads">Downloads</a> |
@ -36,7 +36,7 @@ It is written in C++ with portability in mind, and we actively maintain builds f
## Status
Although we're able to make builds, we don't have a version ready for distribution yet. But we can always use more help! You can make a merge request if you'd like to see something changed, or you can [chat with other developers to find out what needs work](https://discord.gg/2gQRBp44KT).
Although we're able to make builds, we don't have a version ready for distribution yet. But we can always use more help! You can make a merge request if you'd like to see something changed, or you can [chat with other developers to find out what needs work](https://discord.gg/suyu).
**Note**: We try to update this README whenever we can, but some links might be broken, and some information may be outdated or irrelevant.
@ -44,7 +44,7 @@ Although we're able to make builds, we don't have a version ready for distributi
This project is completely free and open source, and anyone can contribute to help improve suyu.
Most of the development happens on GitLab. For development discussion, please join us on [Discord](https://discord.gg/2gQRBp44KT).
Most of the development happens on GitLab. For development discussion, please join us on [Discord](https://discord.gg/suyu).
If you want to contribute, please take a look at the [Contributor's Guide](https://gitlab.com/suyu-emu/suyu/-/wikis/Contributing) and [Developer Information](https://gitlab.com/suyu-emu/suyu/-/wikis/Developer-Information).
You can also contact any of the developers on Discord to learn more about the current state of suyu.
@ -65,7 +65,7 @@ We don't have any official builds yet! If any website or person is claiming to h
## Support
If you have any questions, don't hesitate to ask us on [Discord](https://discord.gg/2gQRBp44KT). We don't bite!
If you have any questions, don't hesitate to ask us on [Discord](https://discord.gg/suyu). We don't bite!
## License

View File

@ -15,8 +15,8 @@ IGlobalStateController::IGlobalStateController(Core::System& system_)
{0, nullptr, "RequestToEnterSleep"},
{1, nullptr, "EnterSleep"},
{2, nullptr, "StartSleepSequence"},
{3, nullptr, "StartShutdownSequence"},
{4, nullptr, "StartRebootSequence"},
{3, D<&IGlobalStateController::StartShutdownSequence>, "StartShutdownSequence"},
{4, D<&IGlobalStateController::StartRebootSequence>, "StartRebootSequence"},
{9, nullptr, "IsAutoPowerDownRequested"},
{10, D<&IGlobalStateController::LoadAndApplyIdlePolicySettings>, "LoadAndApplyIdlePolicySettings"},
{11, nullptr, "NotifyCecSettingsChanged"},
@ -31,6 +31,18 @@ IGlobalStateController::IGlobalStateController(Core::System& system_)
RegisterHandlers(functions);
}
Result IGlobalStateController::StartShutdownSequence() {
LOG_INFO(Service_AM, "called");
system.Exit();
R_SUCCEED();
}
Result IGlobalStateController::StartRebootSequence() {
LOG_INFO(Service_AM, "called");
system.Exit();
R_SUCCEED();
}
IGlobalStateController::~IGlobalStateController() = default;
Result IGlobalStateController::LoadAndApplyIdlePolicySettings() {

View File

@ -18,6 +18,8 @@ public:
~IGlobalStateController() override;
private:
Result StartShutdownSequence();
Result StartRebootSequence();
Result LoadAndApplyIdlePolicySettings();
Result ShouldSleepOnBoot(Out<bool> out_should_sleep_on_boot);
Result GetHdcpAuthenticationFailedEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);

View File

@ -1577,6 +1577,7 @@ void GMainWindow::ConnectMenuEvents() {
[this]() { OnCabinet(Service::NFP::CabinetMode::StartFormatter); });
connect_menu(ui->action_Load_Mii_Edit, &GMainWindow::OnMiiEdit);
connect_menu(ui->action_Open_Controller_Menu, &GMainWindow::OnOpenControllerMenu);
connect_menu(ui->action_Load_Home_Menu, &GMainWindow::OnHomeMenu);
connect_menu(ui->action_Capture_Screenshot, &GMainWindow::OnCaptureScreenshot);
// TAS
@ -4291,6 +4292,29 @@ void GMainWindow::OnOpenControllerMenu() {
LibraryAppletParameters(ControllerAppletId, Service::AM::AppletId::Controller));
}
void GMainWindow::OnHomeMenu() {
constexpr u64 QLaunchId = static_cast<u64>(Service::AM::AppletProgramId::QLaunch);
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
if (!bis_system) {
QMessageBox::warning(this, tr("No firmware available"),
tr("Please install the firmware to use the Home Menu."));
return;
}
auto qlaunch_applet_nca = bis_system->GetEntry(QLaunchId, FileSys::ContentRecordType::Program);
if (!qlaunch_applet_nca) {
QMessageBox::warning(this, tr("Home Menu Applet"),
tr("Home Menu is not available. Please reinstall firmware."));
return;
}
system->GetFrontendAppletHolder().SetCurrentAppletId(Service::AM::AppletId::QLaunch);
const auto filename = QString::fromStdString((qlaunch_applet_nca->GetFullPath()));
UISettings::values.roms_path = QFileInfo(filename).path().toStdString();
BootGame(filename, LibraryAppletParameters(QLaunchId, Service::AM::AppletId::QLaunch));
}
void GMainWindow::OnCaptureScreenshot() {
if (emu_thread == nullptr || !emu_thread->IsRunning()) {
return;

View File

@ -399,6 +399,7 @@ private slots:
void OnCabinet(Service::NFP::CabinetMode mode);
void OnMiiEdit();
void OnOpenControllerMenu();
void OnHomeMenu();
void OnCaptureScreenshot();
void OnCheckFirmwareDecryption();
void OnLanguageChanged(const QString& locale);

View File

@ -173,6 +173,7 @@
<addaction name="action_Load_Album"/>
<addaction name="action_Load_Mii_Edit"/>
<addaction name="action_Open_Controller_Menu"/>
<addaction name="action_Load_Home_Menu"/>
<addaction name="separator"/>
<addaction name="action_Capture_Screenshot"/>
<addaction name="menuTAS"/>
@ -475,6 +476,11 @@
<string>Install Decryption Keys</string>
</property>
</action>
<action name="action_Load_Home_Menu">
<property name="text">
<string>Open Home Menu</string>
</property>
</action>
</widget>
<resources>
<include location="suyu.qrc"/>