diff --git a/src/core/settings.cpp b/src/core/settings.cpp
index 8ad8ff3e6..d75edd672 100644
--- a/src/core/settings.cpp
+++ b/src/core/settings.cpp
@@ -320,7 +320,6 @@ void Settings::Load(SettingsInterface& si)
audio_fast_forward_volume = si.GetUIntValue("Audio", "FastForwardVolume", 100);
audio_output_muted = si.GetBoolValue("Audio", "OutputMuted", false);
- audio_dump_on_boot = si.GetBoolValue("Audio", "DumpOnBoot", false);
use_old_mdec_routines = si.GetBoolValue("Hacks", "UseOldMDECRoutines", false);
pcdrv_enable = si.GetBoolValue("PCDrv", "Enabled", false);
@@ -573,7 +572,6 @@ void Settings::Save(SettingsInterface& si, bool ignore_base) const
si.SetUIntValue("Audio", "OutputVolume", audio_output_volume);
si.SetUIntValue("Audio", "FastForwardVolume", audio_fast_forward_volume);
si.SetBoolValue("Audio", "OutputMuted", audio_output_muted);
- si.SetBoolValue("Audio", "DumpOnBoot", audio_dump_on_boot);
si.SetBoolValue("Hacks", "UseOldMDECRoutines", use_old_mdec_routines);
diff --git a/src/core/settings.h b/src/core/settings.h
index d431fdb5b..71837cf53 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -187,7 +187,6 @@ struct Settings
u32 audio_output_volume = 100;
u32 audio_fast_forward_volume = 100;
bool audio_output_muted : 1 = false;
- bool audio_dump_on_boot : 1 = false;
bool use_old_mdec_routines : 1 = false;
bool pcdrv_enable : 1 = false;
diff --git a/src/core/system.cpp b/src/core/system.cpp
index c833bb1fb..177fb6c54 100644
--- a/src/core/system.cpp
+++ b/src/core/system.cpp
@@ -1549,7 +1549,7 @@ bool System::BootSystem(SystemBootParameters parameters, Error* error)
if (parameters.fast_forward_to_first_frame)
FastForwardToFirstFrame();
- if (g_settings.audio_dump_on_boot)
+ if (parameters.start_audio_dump)
StartDumpingAudio();
if (g_settings.start_paused || parameters.override_start_paused.value_or(false))
diff --git a/src/core/system.h b/src/core/system.h
index 0f469f24f..cc6926cc1 100644
--- a/src/core/system.h
+++ b/src/core/system.h
@@ -56,6 +56,7 @@ struct SystemBootParameters
bool force_software_renderer = false;
bool fast_forward_to_first_frame = false;
bool disable_achievements_hardcore_mode = false;
+ bool start_audio_dump = false;
};
struct SaveStateInfo
diff --git a/src/duckstation-qt/audiosettingswidget.cpp b/src/duckstation-qt/audiosettingswidget.cpp
index 34ec95056..3468b95fb 100644
--- a/src/duckstation-qt/audiosettingswidget.cpp
+++ b/src/duckstation-qt/audiosettingswidget.cpp
@@ -29,7 +29,6 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent
Settings::DEFAULT_AUDIO_BUFFER_MS);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.outputLatencyMS, "Audio", "OutputLatencyMS",
Settings::DEFAULT_AUDIO_OUTPUT_LATENCY_MS);
- SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.startDumpingOnBoot, "Audio", "DumpOnBoot", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.muteCDAudio, "CDROM", "MuteCDAudio", false);
connect(m_ui.audioBackend, &QComboBox::currentIndexChanged, this, &AudioSettingsWidget::updateDriverNames);
updateDriverNames();
@@ -71,9 +70,6 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent
"host. Smaller values reduce the output latency, but may cause hitches if the emulation "
"speed is inconsistent. Note that the Cubeb backend uses smaller chunks regardless of "
"this value, so using a low value here may not significantly change latency."));
- dialog->registerWidgetHelp(
- m_ui.startDumpingOnBoot, tr("Start Dumping On Boot"), tr("Unchecked"),
- tr("Start dumping audio to file as soon as the emulator is started. Mainly useful as a debug option."));
dialog->registerWidgetHelp(m_ui.volume, tr("Output Volume"), "100%",
tr("Controls the volume of the audio played on the host."));
dialog->registerWidgetHelp(m_ui.fastForwardVolume, tr("Fast Forward Volume"), "100%",
diff --git a/src/duckstation-qt/audiosettingswidget.ui b/src/duckstation-qt/audiosettingswidget.ui
index e1c7a51ea..a37de918c 100644
--- a/src/duckstation-qt/audiosettingswidget.ui
+++ b/src/duckstation-qt/audiosettingswidget.ui
@@ -29,6 +29,23 @@
Configuration
+ -
+
+
+ -
+
+
+ Output Latency:
+
+
+
+ -
+
+
+ Output Device:
+
+
+
-
@@ -47,16 +64,30 @@
50
- Qt::Horizontal
+ Qt::Orientation::Horizontal
- QSlider::TicksBothSides
+ QSlider::TickPosition::TicksBothSides
20
+ -
+
+
+ Backend:
+
+
+
+ -
+
+
+ Driver:
+
+
+
-
@@ -67,6 +98,36 @@
+ -
+
+
-
+
+
+ 500
+
+
+ Qt::Orientation::Horizontal
+
+
+ QSlider::TickPosition::TicksBothSides
+
+
+ 20
+
+
+
+ -
+
+
+ Minimal
+
+
+
+
+
+ -
+
+
-
@@ -74,6 +135,16 @@
+ -
+
+
+ Maximum latency: 0 frames (0.00ms)
+
+
+ Qt::AlignmentFlag::AlignCenter
+
+
+
-
-
@@ -93,84 +164,6 @@
- -
-
-
- Maximum latency: 0 frames (0.00ms)
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Backend:
-
-
-
- -
-
-
- -
-
-
- Output Latency:
-
-
-
- -
-
-
- Driver:
-
-
-
- -
-
-
- Start Dumping On Boot
-
-
-
- -
-
-
-
-
-
- 500
-
-
- Qt::Horizontal
-
-
- QSlider::TicksBothSides
-
-
- 20
-
-
-
- -
-
-
- Minimal
-
-
-
-
-
- -
-
-
- Output Device:
-
-
-
- -
-
-
@@ -198,10 +191,10 @@
100
- Qt::Horizontal
+ Qt::Orientation::Horizontal
- QSlider::TicksBothSides
+ QSlider::TickPosition::TicksBothSides
10
@@ -220,7 +213,7 @@
100%
- Qt::AlignCenter
+ Qt::AlignmentFlag::AlignCenter
@@ -237,10 +230,10 @@
100
- Qt::Horizontal
+ Qt::Orientation::Horizontal
- QSlider::TicksBothSides
+ QSlider::TickPosition::TicksBothSides
10
@@ -259,7 +252,7 @@
100%
- Qt::AlignCenter
+ Qt::AlignmentFlag::AlignCenter
@@ -292,7 +285,7 @@
-
- Qt::Vertical
+ Qt::Orientation::Vertical
diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp
index 53259e2ed..9f8bd6413 100644
--- a/src/duckstation-qt/mainwindow.cpp
+++ b/src/duckstation-qt/mainwindow.cpp
@@ -1117,6 +1117,13 @@ void MainWindow::populateCheatsMenu(QMenu* menu)
}
}
+std::shared_ptr MainWindow::getSystemBootParameters(std::string file)
+{
+ std::shared_ptr ret = std::make_shared(std::move(file));
+ ret->start_audio_dump = m_ui.actionDumpAudio->isChecked();
+ return ret;
+}
+
std::optional MainWindow::promptForResumeState(const std::string& save_state_path)
{
FILESYSTEM_STAT_DATA sd;
@@ -1163,8 +1170,7 @@ std::optional MainWindow::promptForResumeState(const std::string& save_sta
void MainWindow::startFile(std::string path, std::optional save_path, std::optional fast_boot)
{
- std::shared_ptr params = std::make_shared();
- params->filename = std::move(path);
+ std::shared_ptr params = getSystemBootParameters(std::move(path));
params->override_fast_boot = fast_boot;
if (save_path.has_value())
params->save_state = std::move(save_path.value());
@@ -1237,12 +1243,12 @@ void MainWindow::onStartDiscActionTriggered()
if (path.empty())
return;
- g_emu_thread->bootSystem(std::make_shared(std::move(path)));
+ g_emu_thread->bootSystem(getSystemBootParameters(std::move(path)));
}
void MainWindow::onStartBIOSActionTriggered()
{
- g_emu_thread->bootSystem(std::make_shared());
+ g_emu_thread->bootSystem(getSystemBootParameters(std::string()));
}
void MainWindow::onChangeDiscFromFileActionTriggered()
@@ -1477,16 +1483,16 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
menu.addSeparator();
connect(menu.addAction(tr("Default Boot")), &QAction::triggered,
- [entry]() { g_emu_thread->bootSystem(std::make_shared(entry->path)); });
+ [this, entry]() { g_emu_thread->bootSystem(getSystemBootParameters(entry->path)); });
- connect(menu.addAction(tr("Fast Boot")), &QAction::triggered, [entry]() {
- auto boot_params = std::make_shared(entry->path);
+ connect(menu.addAction(tr("Fast Boot")), &QAction::triggered, [this, entry]() {
+ std::shared_ptr boot_params = getSystemBootParameters(entry->path);
boot_params->override_fast_boot = true;
g_emu_thread->bootSystem(std::move(boot_params));
});
- connect(menu.addAction(tr("Full Boot")), &QAction::triggered, [entry]() {
- auto boot_params = std::make_shared(entry->path);
+ connect(menu.addAction(tr("Full Boot")), &QAction::triggered, [this, entry]() {
+ std::shared_ptr boot_params = getSystemBootParameters(entry->path);
boot_params->override_fast_boot = false;
g_emu_thread->bootSystem(std::move(boot_params));
});
@@ -1496,7 +1502,7 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
connect(menu.addAction(tr("Boot and Debug")), &QAction::triggered, [this, entry]() {
m_open_debugger_on_start = true;
- auto boot_params = std::make_shared(entry->path);
+ std::shared_ptr boot_params = getSystemBootParameters(entry->path);
boot_params->override_start_paused = true;
g_emu_thread->bootSystem(std::move(boot_params));
});
diff --git a/src/duckstation-qt/mainwindow.h b/src/duckstation-qt/mainwindow.h
index 039879269..17c4ef16a 100644
--- a/src/duckstation-qt/mainwindow.h
+++ b/src/duckstation-qt/mainwindow.h
@@ -33,6 +33,8 @@ class CheatManagerWindow;
class DebuggerWindow;
class MemoryScannerWindow;
+struct SystemBootParameters;
+
class GPUDevice;
namespace Achievements {
enum class LoginRequestReason;
@@ -269,6 +271,7 @@ private:
/// Fills menu with the current cheat options.
void populateCheatsMenu(QMenu* menu);
+ std::shared_ptr getSystemBootParameters(std::string file);
std::optional promptForResumeState(const std::string& save_state_path);
void startFile(std::string path, std::optional save_path, std::optional fast_boot);
void startFileOrChangeDisc(const QString& path);