early-access version 2169
This commit is contained in:
parent
3ba284c8c2
commit
89888d0ff7
9 changed files with 27 additions and 66 deletions
|
@ -1,7 +1,7 @@
|
|||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 2168.
|
||||
This is the source code for early-access 2169.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
|
|
@ -618,7 +618,6 @@ struct Values {
|
|||
// Miscellaneous
|
||||
BasicSetting<std::string> log_filter{"*:Info", "log_filter"};
|
||||
BasicSetting<bool> use_dev_keys{false, "use_dev_keys"};
|
||||
BasicSetting<bool> disable_screen_saver{true, "disable_screen_saver"};
|
||||
|
||||
// Network
|
||||
BasicSetting<std::string> network_interface{std::string(), "network_interface"};
|
||||
|
|
|
@ -738,7 +738,6 @@ void Config::ReadMiscellaneousValues() {
|
|||
|
||||
ReadBasicSetting(Settings::values.log_filter);
|
||||
ReadBasicSetting(Settings::values.use_dev_keys);
|
||||
ReadBasicSetting(Settings::values.disable_screen_saver);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
|
@ -1300,7 +1299,6 @@ void Config::SaveMiscellaneousValues() {
|
|||
|
||||
WriteBasicSetting(Settings::values.log_filter);
|
||||
WriteBasicSetting(Settings::values.use_dev_keys);
|
||||
WriteBasicSetting(Settings::values.disable_screen_saver);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ void ConfigureGeneral::SetConfiguration() {
|
|||
ui->toggle_user_on_boot->setChecked(UISettings::values.select_user_on_boot.GetValue());
|
||||
ui->toggle_background_pause->setChecked(UISettings::values.pause_when_in_background.GetValue());
|
||||
ui->toggle_hide_mouse->setChecked(UISettings::values.hide_mouse.GetValue());
|
||||
ui->toggle_screen_saver->setChecked(Settings::values.disable_screen_saver.GetValue());
|
||||
|
||||
ui->toggle_speed_limit->setChecked(Settings::values.use_speed_limit.GetValue());
|
||||
ui->speed_limit->setValue(Settings::values.speed_limit.GetValue());
|
||||
|
@ -89,7 +88,6 @@ void ConfigureGeneral::ApplyConfiguration() {
|
|||
UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked();
|
||||
UISettings::values.pause_when_in_background = ui->toggle_background_pause->isChecked();
|
||||
UISettings::values.hide_mouse = ui->toggle_hide_mouse->isChecked();
|
||||
Settings::values.disable_screen_saver = ui->toggle_screen_saver->isChecked();
|
||||
|
||||
Settings::values.fps_cap.SetValue(ui->fps_cap->value());
|
||||
|
||||
|
@ -138,7 +136,6 @@ void ConfigureGeneral::SetupPerGameUI() {
|
|||
ui->toggle_user_on_boot->setVisible(false);
|
||||
ui->toggle_background_pause->setVisible(false);
|
||||
ui->toggle_hide_mouse->setVisible(false);
|
||||
ui->toggle_screen_saver->setVisible(false);
|
||||
|
||||
ui->button_reset_defaults->setVisible(false);
|
||||
|
||||
|
|
|
@ -119,13 +119,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="toggle_screen_saver">
|
||||
<property name="text">
|
||||
<string>Disable screen saver while in game</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -1157,24 +1157,21 @@ void GMainWindow::RestoreUIState() {
|
|||
}
|
||||
|
||||
void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
|
||||
if (!UISettings::values.pause_when_in_background) {
|
||||
return;
|
||||
}
|
||||
if (state != Qt::ApplicationHidden && state != Qt::ApplicationInactive &&
|
||||
state != Qt::ApplicationActive) {
|
||||
LOG_DEBUG(Frontend, "ApplicationState unusual flag: {} ", state);
|
||||
}
|
||||
if (state & (Qt::ApplicationHidden | Qt::ApplicationInactive)) {
|
||||
if (UISettings::values.pause_when_in_background && ui->action_Pause->isEnabled()) {
|
||||
if (ui->action_Pause->isEnabled() &&
|
||||
(state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
|
||||
auto_paused = true;
|
||||
OnPauseGame();
|
||||
}
|
||||
AllowOSSleep();
|
||||
} else if (state == Qt::ApplicationActive) {
|
||||
if (UISettings::values.pause_when_in_background && ui->action_Start->isEnabled() &&
|
||||
auto_paused) {
|
||||
} else if (ui->action_Start->isEnabled() && auto_paused && state == Qt::ApplicationActive) {
|
||||
auto_paused = false;
|
||||
OnStartGame();
|
||||
}
|
||||
PreventOSSleep();
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::ConnectWidgetEvents() {
|
||||
|
@ -1293,14 +1290,12 @@ void GMainWindow::OnDisplayTitleBars(bool show) {
|
|||
}
|
||||
|
||||
void GMainWindow::PreventOSSleep() {
|
||||
if (Settings::values.disable_screen_saver) {
|
||||
#ifdef _WIN32
|
||||
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);
|
||||
#elif defined(HAVE_SDL2)
|
||||
SDL_DisableScreenSaver();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::AllowOSSleep() {
|
||||
#ifdef _WIN32
|
||||
|
@ -1344,12 +1339,10 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p
|
|||
static_cast<u32>(CalloutFlag::DRDDeprecation);
|
||||
QMessageBox::warning(
|
||||
this, tr("Warning Outdated Game Format"),
|
||||
tr("You are using the deconstructed ROM directory format for this game, which is "
|
||||
"an "
|
||||
tr("You are using the deconstructed ROM directory format for this game, which is an "
|
||||
"outdated format that has been superseded by others such as NCA, NAX, XCI, or "
|
||||
"NSP. Deconstructed ROM directories lack icons, metadata, and update "
|
||||
"support.<br><br>For an explanation of the various Switch formats yuzu "
|
||||
"supports, <a "
|
||||
"support.<br><br>For an explanation of the various Switch formats yuzu supports, <a "
|
||||
"href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our "
|
||||
"wiki</a>. This message will not be shown again."));
|
||||
}
|
||||
|
@ -1367,9 +1360,7 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p
|
|||
tr("yuzu has encountered an error while running the video core, please see the "
|
||||
"log for more details."
|
||||
"For more information on accessing the log, please see the following page: "
|
||||
"<a "
|
||||
"href='https://community.citra-emu.org/t/how-to-upload-the-log-file/"
|
||||
"296'>How "
|
||||
"<a href='https://community.citra-emu.org/t/how-to-upload-the-log-file/296'>How "
|
||||
"to "
|
||||
"Upload the Log File</a>."
|
||||
"Ensure that you have the latest graphics drivers for your GPU."));
|
||||
|
@ -1387,8 +1378,7 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p
|
|||
tr("Error while loading ROM! %1", "%1 signifies a numeric error code.")
|
||||
.arg(QString::fromStdString(error_code));
|
||||
const auto description =
|
||||
tr("%1<br>Please follow <a "
|
||||
"href='https://yuzu-emu.org/help/quickstart/'>the "
|
||||
tr("%1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the "
|
||||
"yuzu quickstart guide</a> to redump your files.<br>You can refer "
|
||||
"to the yuzu wiki</a> or the yuzu Discord</a> for help.",
|
||||
"%1 signifies an error string.")
|
||||
|
@ -1479,8 +1469,8 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
|
|||
|
||||
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 before the CPU continues
|
||||
// BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views
|
||||
// before the CPU continues
|
||||
connect(emu_thread.get(), &EmuThread::DebugModeEntered, waitTreeWidget,
|
||||
&WaitTreeWidget::OnDebugModeEntered, Qt::BlockingQueuedConnection);
|
||||
connect(emu_thread.get(), &EmuThread::DebugModeLeft, waitTreeWidget,
|
||||
|
@ -2065,8 +2055,7 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa
|
|||
const QStringList selections{tr("Full"), tr("Skeleton")};
|
||||
const auto res = QInputDialog::getItem(
|
||||
this, tr("Select RomFS Dump Mode"),
|
||||
tr("Please select the how you would like the RomFS dumped.<br>Full will copy all of "
|
||||
"the "
|
||||
tr("Please select the how you would like the RomFS dumped.<br>Full will copy all of the "
|
||||
"files into the new directory while <br>skeleton will only create the directory "
|
||||
"structure."),
|
||||
selections, 0, false, &ok);
|
||||
|
@ -2328,8 +2317,7 @@ void GMainWindow::OnMenuInstallToNAND() {
|
|||
if (detected_base_install) {
|
||||
QMessageBox::warning(
|
||||
this, tr("Install Results"),
|
||||
tr("To avoid possible conflicts, we discourage users from installing base games to "
|
||||
"the "
|
||||
tr("To avoid possible conflicts, we discourage users from installing base games to the "
|
||||
"NAND.\nPlease, only use this feature to install updates and DLC."));
|
||||
}
|
||||
|
||||
|
@ -2741,13 +2729,13 @@ void GMainWindow::OnConfigure() {
|
|||
const auto result = configure_dialog.exec();
|
||||
if (result != QDialog::Accepted && !UISettings::values.configuration_applied &&
|
||||
!UISettings::values.reset_to_defaults) {
|
||||
// Runs if the user hit Cancel or closed the window, and did not ever press the Apply
|
||||
// button or `Reset to Defaults` button
|
||||
// Runs if the user hit Cancel or closed the window, and did not ever press the Apply button
|
||||
// or `Reset to Defaults` button
|
||||
return;
|
||||
} else if (result == QDialog::Accepted) {
|
||||
// Only apply new changes if user hit Okay
|
||||
// This is here to avoid applying changes if the user hit Apply, made some changes, then
|
||||
// hit Cancel
|
||||
// This is here to avoid applying changes if the user hit Apply, made some changes, then hit
|
||||
// Cancel
|
||||
configure_dialog.ApplyConfiguration();
|
||||
} else if (UISettings::values.reset_to_defaults) {
|
||||
LOG_INFO(Frontend, "Resetting all settings to defaults");
|
||||
|
@ -2763,8 +2751,8 @@ void GMainWindow::OnConfigure() {
|
|||
LOG_WARNING(Frontend, "Failed to remove game metadata cache files");
|
||||
}
|
||||
|
||||
// Explicitly save the game directories, since reinitializing config does not explicitly
|
||||
// do so.
|
||||
// Explicitly save the game directories, since reinitializing config does not explicitly do
|
||||
// so.
|
||||
QVector<UISettings::GameDir> old_game_dirs = std::move(UISettings::values.game_dirs);
|
||||
QVector<u64> old_favorited_ids = std::move(UISettings::values.favorited_ids);
|
||||
|
||||
|
@ -2811,12 +2799,6 @@ void GMainWindow::OnConfigure() {
|
|||
render_window->setAttribute(Qt::WA_Hover, false);
|
||||
}
|
||||
|
||||
if (emulation_running) {
|
||||
PreventOSSleep();
|
||||
} else {
|
||||
AllowOSSleep();
|
||||
}
|
||||
|
||||
if (UISettings::values.hide_mouse) {
|
||||
mouse_hide_timer.start();
|
||||
}
|
||||
|
|
|
@ -485,7 +485,6 @@ void Config::ReadValues() {
|
|||
Settings::values.log_filter =
|
||||
sdl2_config->Get("Miscellaneous", Settings::values.log_filter.GetLabel(), "*:Trace");
|
||||
ReadSetting("Miscellaneous", Settings::values.use_dev_keys);
|
||||
ReadSetting("Miscellaneous", Settings::values.disable_screen_saver);
|
||||
|
||||
// Debugging
|
||||
Settings::values.record_frame_times =
|
||||
|
|
|
@ -414,10 +414,6 @@ log_filter = *:Trace
|
|||
# 0 (default): Disabled, 1: Enabled
|
||||
use_dev_keys =
|
||||
|
||||
# Disables the screensaver while yuzu is in session.
|
||||
# 1 (defualt): Yes, 0 : No
|
||||
disable_screen_saver =
|
||||
|
||||
[Debugging]
|
||||
# Record frame time data, can be found in the log directory. Boolean value
|
||||
record_frame_times =
|
||||
|
|
|
@ -22,9 +22,6 @@ EmuWindow_SDL2::EmuWindow_SDL2(InputCommon::InputSubsystem* input_subsystem_, Co
|
|||
LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting...");
|
||||
exit(1);
|
||||
}
|
||||
if (!Settings::values.disable_screen_saver) {
|
||||
SDL_EnableScreenSaver();
|
||||
}
|
||||
input_subsystem->Initialize();
|
||||
SDL_SetMainReady();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue