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
=============
This is the source code for early-access 3238.
This is the source code for early-access 3239.
## Legal Notice

View file

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

View file

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

View file

@ -3,6 +3,7 @@
#include <QKeyEvent>
#include <QScreen>
#include <QWindow>
#include "core/core.h"
#include "core/hid/hid_types.h"
@ -162,7 +163,7 @@ void OverlayDialog::MoveAndResizeWindow() {
const auto height = static_cast<float>(parentWidget()->height());
// 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 body_text_font_size =