early-access version 3239

This commit is contained in:
pineappleEA 2022-12-22 06:11:48 +01:00
parent 4b7fd567e6
commit 3ff418065e
4 changed files with 14 additions and 6 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 3238. This is the source code for early-access 3239.
## Legal Notice ## Legal Notice

View File

@ -78,7 +78,6 @@ void EmuThread::run() {
gpu.Start(); gpu.Start();
m_system.GetCpuManager().OnGpuReady(); m_system.GetCpuManager().OnGpuReady();
m_system.RegisterExitCallback([this] { m_stop_source.request_stop(); });
if (m_system.DebuggerEnabled()) { if (m_system.DebuggerEnabled()) {
m_system.InitializeDebugger(); m_system.InitializeDebugger();

View File

@ -1710,6 +1710,11 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
system->RegisterExecuteProgramCallback( system->RegisterExecuteProgramCallback(
[this](std::size_t program_index_) { render_window->ExecuteProgram(program_index_); }); [this](std::size_t program_index_) { render_window->ExecuteProgram(program_index_); });
system->RegisterExitCallback([this] {
emu_thread->ForceStop();
render_window->Exit();
});
connect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame); connect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame);
connect(render_window, &GRenderWindow::MouseActivity, this, &GMainWindow::OnMouseActivity); connect(render_window, &GRenderWindow::MouseActivity, this, &GMainWindow::OnMouseActivity);
// BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views
@ -1814,9 +1819,8 @@ void GMainWindow::OnShutdownBegin() {
} }
void GMainWindow::OnShutdownBeginDialog() { void GMainWindow::OnShutdownBeginDialog() {
shutdown_dialog = shutdown_dialog = new OverlayDialog(this, *system, QString{}, tr("Closing software..."),
new OverlayDialog(render_window, *system, QString{}, tr("Closing software..."), QString{}, QString{}, QString{}, Qt::AlignHCenter | Qt::AlignVCenter);
QString{}, Qt::AlignHCenter | Qt::AlignVCenter);
shutdown_dialog->open(); shutdown_dialog->open();
} }
@ -4178,6 +4182,10 @@ bool GMainWindow::ConfirmForceLockedExit() {
} }
void GMainWindow::RequestGameExit() { void GMainWindow::RequestGameExit() {
if (!system->IsPoweredOn()) {
return;
}
auto& sm{system->ServiceManager()}; auto& sm{system->ServiceManager()};
auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE"); auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE");
auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE"); auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE");

View File

@ -3,6 +3,7 @@
#include <QKeyEvent> #include <QKeyEvent>
#include <QScreen> #include <QScreen>
#include <QWindow>
#include "core/core.h" #include "core/core.h"
#include "core/hid/hid_types.h" #include "core/hid/hid_types.h"
@ -162,7 +163,7 @@ void OverlayDialog::MoveAndResizeWindow() {
const auto height = static_cast<float>(parentWidget()->height()); const auto height = static_cast<float>(parentWidget()->height());
// High DPI // High DPI
const float dpi_scale = qApp->screenAt(pos)->logicalDotsPerInch() / 96.0f; const float dpi_scale = parentWidget()->windowHandle()->screen()->logicalDotsPerInch() / 96.0f;
const auto title_text_font_size = BASE_TITLE_FONT_SIZE * (height / BASE_HEIGHT) / dpi_scale; const auto title_text_font_size = BASE_TITLE_FONT_SIZE * (height / BASE_HEIGHT) / dpi_scale;
const auto body_text_font_size = const auto body_text_font_size =