mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-22 10:04:39 +00:00
Volume slider that adjusts how loud games are on a global level (#3240)
* Update config.cpp * Update config.h * Update sdl_audio.cpp * Update settings_dialog.cpp * Update settings_dialog.h * Update settings_dialog.ui * Update gui_settings.h * Update audioout.cpp * Update audioout.h * Update settings_dialog.cpp * remove leftover settings_dialog.ui * Update settings_dialog.ui --------- Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
parent
e914099ae2
commit
fafd3fb564
@ -32,6 +32,7 @@ std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
|
|||||||
namespace Config {
|
namespace Config {
|
||||||
|
|
||||||
// General
|
// General
|
||||||
|
static int volumeSlider = 100;
|
||||||
static bool isNeo = false;
|
static bool isNeo = false;
|
||||||
static bool isDevKit = false;
|
static bool isDevKit = false;
|
||||||
static bool isPSNSignedIn = false;
|
static bool isPSNSignedIn = false;
|
||||||
@ -108,6 +109,9 @@ static std::string trophyKey = "";
|
|||||||
// Expected number of items in the config file
|
// Expected number of items in the config file
|
||||||
static constexpr u64 total_entries = 54;
|
static constexpr u64 total_entries = 54;
|
||||||
|
|
||||||
|
int getVolumeSlider() {
|
||||||
|
return volumeSlider;
|
||||||
|
}
|
||||||
bool allowHDR() {
|
bool allowHDR() {
|
||||||
return isHDRAllowed;
|
return isHDRAllowed;
|
||||||
}
|
}
|
||||||
@ -157,6 +161,10 @@ std::filesystem::path GetSaveDataPath() {
|
|||||||
return save_data_path;
|
return save_data_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setVolumeSlider(int volumeValue) {
|
||||||
|
volumeSlider = volumeValue;
|
||||||
|
}
|
||||||
|
|
||||||
void setLoadGameSizeEnabled(bool enable) {
|
void setLoadGameSizeEnabled(bool enable) {
|
||||||
load_game_size = enable;
|
load_game_size = enable;
|
||||||
}
|
}
|
||||||
@ -611,6 +619,7 @@ void load(const std::filesystem::path& path) {
|
|||||||
if (data.contains("General")) {
|
if (data.contains("General")) {
|
||||||
const toml::value& general = data.at("General");
|
const toml::value& general = data.at("General");
|
||||||
|
|
||||||
|
volumeSlider = toml::find_or<int>(general, "volumeSlider", volumeSlider);
|
||||||
isNeo = toml::find_or<bool>(general, "isPS4Pro", isNeo);
|
isNeo = toml::find_or<bool>(general, "isPS4Pro", isNeo);
|
||||||
isDevKit = toml::find_or<bool>(general, "isDevKit", isDevKit);
|
isDevKit = toml::find_or<bool>(general, "isDevKit", isDevKit);
|
||||||
isPSNSignedIn = toml::find_or<bool>(general, "isPSNSignedIn", isPSNSignedIn);
|
isPSNSignedIn = toml::find_or<bool>(general, "isPSNSignedIn", isPSNSignedIn);
|
||||||
@ -806,6 +815,7 @@ void save(const std::filesystem::path& path) {
|
|||||||
fmt::print("Saving new configuration file {}\n", fmt::UTF(path.u8string()));
|
fmt::print("Saving new configuration file {}\n", fmt::UTF(path.u8string()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data["General"]["volumeSlider"] = volumeSlider;
|
||||||
data["General"]["isPS4Pro"] = isNeo;
|
data["General"]["isPS4Pro"] = isNeo;
|
||||||
data["General"]["isDevKit"] = isDevKit;
|
data["General"]["isDevKit"] = isDevKit;
|
||||||
data["General"]["isPSNSignedIn"] = isPSNSignedIn;
|
data["General"]["isPSNSignedIn"] = isPSNSignedIn;
|
||||||
@ -901,6 +911,7 @@ void save(const std::filesystem::path& path) {
|
|||||||
|
|
||||||
void setDefaultValues() {
|
void setDefaultValues() {
|
||||||
// General
|
// General
|
||||||
|
volumeSlider = 100;
|
||||||
isNeo = false;
|
isNeo = false;
|
||||||
isDevKit = false;
|
isDevKit = false;
|
||||||
isPSNSignedIn = false;
|
isPSNSignedIn = false;
|
||||||
|
@ -19,6 +19,8 @@ enum HideCursorState : int { Never, Idle, Always };
|
|||||||
void load(const std::filesystem::path& path);
|
void load(const std::filesystem::path& path);
|
||||||
void save(const std::filesystem::path& path);
|
void save(const std::filesystem::path& path);
|
||||||
|
|
||||||
|
int getVolumeSlider();
|
||||||
|
void setVolumeSlider(int volumeValue);
|
||||||
std::string getTrophyKey();
|
std::string getTrophyKey();
|
||||||
void setTrophyKey(std::string key);
|
void setTrophyKey(std::string key);
|
||||||
bool getIsFullscreen();
|
bool getIsFullscreen();
|
||||||
|
@ -523,9 +523,24 @@ s32 PS4_SYSV_ABI sceAudioOutSetVolume(s32 handle, s32 flag, s32* vol) {
|
|||||||
}
|
}
|
||||||
port.impl->SetVolume(port.volume);
|
port.impl->SetVolume(port.volume);
|
||||||
}
|
}
|
||||||
|
AdjustVol();
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AdjustVol() {
|
||||||
|
if (audio == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < ports_out.size(); i++) {
|
||||||
|
std::unique_lock lock{ports_out[i].mutex};
|
||||||
|
if (!ports_out[i].IsOpen()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ports_out[i].impl->SetVolume(ports_out[i].volume);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceAudioOutSetVolumeDown() {
|
int PS4_SYSV_ABI sceAudioOutSetVolumeDown() {
|
||||||
LOG_ERROR(Lib_AudioOut, "(STUBBED) called");
|
LOG_ERROR(Lib_AudioOut, "(STUBBED) called");
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
|
@ -181,5 +181,6 @@ int PS4_SYSV_ABI sceAudioOutSystemControlSet();
|
|||||||
int PS4_SYSV_ABI sceAudioOutSparkControlSetEqCoef();
|
int PS4_SYSV_ABI sceAudioOutSparkControlSetEqCoef();
|
||||||
int PS4_SYSV_ABI sceAudioOutSetSystemDebugState();
|
int PS4_SYSV_ABI sceAudioOutSetSystemDebugState();
|
||||||
|
|
||||||
|
void AdjustVol();
|
||||||
void RegisterLib(Core::Loader::SymbolsResolver* sym);
|
void RegisterLib(Core::Loader::SymbolsResolver* sym);
|
||||||
} // namespace Libraries::AudioOut
|
} // namespace Libraries::AudioOut
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
#include <SDL3/SDL_audio.h>
|
#include <SDL3/SDL_audio.h>
|
||||||
#include <SDL3/SDL_hints.h>
|
#include <SDL3/SDL_hints.h>
|
||||||
|
#include <common/config.h>
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/libraries/audio/audioout.h"
|
#include "core/libraries/audio/audioout.h"
|
||||||
@ -41,6 +42,7 @@ public:
|
|||||||
stream = nullptr;
|
stream = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
SDL_SetAudioStreamGain(stream, Config::getVolumeSlider() / 100.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
~SDLPortBackend() override {
|
~SDLPortBackend() override {
|
||||||
@ -77,7 +79,8 @@ public:
|
|||||||
}
|
}
|
||||||
// SDL does not have per-channel volumes, for now just take the maximum of the channels.
|
// SDL does not have per-channel volumes, for now just take the maximum of the channels.
|
||||||
const auto vol = *std::ranges::max_element(ch_volumes);
|
const auto vol = *std::ranges::max_element(ch_volumes);
|
||||||
if (!SDL_SetAudioStreamGain(stream, static_cast<float>(vol) / SCE_AUDIO_OUT_VOLUME_0DB)) {
|
if (!SDL_SetAudioStreamGain(stream, static_cast<float>(vol) / SCE_AUDIO_OUT_VOLUME_0DB *
|
||||||
|
Config::getVolumeSlider() / 100.0f)) {
|
||||||
LOG_WARNING(Lib_AudioOut, "Failed to change SDL audio stream volume: {}",
|
LOG_WARNING(Lib_AudioOut, "Failed to change SDL audio stream volume: {}",
|
||||||
SDL_GetError());
|
SDL_GetError());
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ const gui_value gl_showBackgroundImage = gui_value(game_list, "showBackgroundIma
|
|||||||
const gui_value gl_backgroundImageOpacity = gui_value(game_list, "backgroundImageOpacity", 50);
|
const gui_value gl_backgroundImageOpacity = gui_value(game_list, "backgroundImageOpacity", 50);
|
||||||
const gui_value gl_playBackgroundMusic = gui_value(game_list, "playBackgroundMusic", true);
|
const gui_value gl_playBackgroundMusic = gui_value(game_list, "playBackgroundMusic", true);
|
||||||
const gui_value gl_backgroundMusicVolume = gui_value(game_list, "backgroundMusicVolume", 50);
|
const gui_value gl_backgroundMusicVolume = gui_value(game_list, "backgroundMusicVolume", 50);
|
||||||
|
const gui_value gl_VolumeSlider = gui_value(game_list, "volumeSlider", 100);
|
||||||
|
|
||||||
// game grid settings
|
// game grid settings
|
||||||
const gui_value gg_icon_size = gui_value(game_grid, "icon_size", 69);
|
const gui_value gg_icon_size = gui_value(game_grid, "icon_size", 69);
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "common/scm_rev.h"
|
#include "common/scm_rev.h"
|
||||||
|
#include "core/libraries/audio/audioout.h"
|
||||||
#include "qt_gui/compatibility_info.h"
|
#include "qt_gui/compatibility_info.h"
|
||||||
#ifdef ENABLE_DISCORD_RPC
|
#ifdef ENABLE_DISCORD_RPC
|
||||||
#include "common/discord_rpc_handler.h"
|
#include "common/discord_rpc_handler.h"
|
||||||
@ -68,6 +69,7 @@ QMap<QString, QString> chooseHomeTabMap;
|
|||||||
|
|
||||||
int backgroundImageOpacitySlider_backup;
|
int backgroundImageOpacitySlider_backup;
|
||||||
int bgm_volume_backup;
|
int bgm_volume_backup;
|
||||||
|
int volume_slider_backup;
|
||||||
|
|
||||||
static std::vector<QString> m_physical_devices;
|
static std::vector<QString> m_physical_devices;
|
||||||
|
|
||||||
@ -149,9 +151,11 @@ SettingsDialog::SettingsDialog(std::shared_ptr<gui_settings> gui_settings,
|
|||||||
} else if (button == ui->buttonBox->button(QDialogButtonBox::Close)) {
|
} else if (button == ui->buttonBox->button(QDialogButtonBox::Close)) {
|
||||||
ui->backgroundImageOpacitySlider->setValue(backgroundImageOpacitySlider_backup);
|
ui->backgroundImageOpacitySlider->setValue(backgroundImageOpacitySlider_backup);
|
||||||
emit BackgroundOpacityChanged(backgroundImageOpacitySlider_backup);
|
emit BackgroundOpacityChanged(backgroundImageOpacitySlider_backup);
|
||||||
|
ui->horizontalVolumeSlider->setValue(volume_slider_backup);
|
||||||
|
Config::setVolumeSlider(volume_slider_backup);
|
||||||
ui->BGMVolumeSlider->setValue(bgm_volume_backup);
|
ui->BGMVolumeSlider->setValue(bgm_volume_backup);
|
||||||
BackgroundMusicPlayer::getInstance().setVolume(bgm_volume_backup);
|
BackgroundMusicPlayer::getInstance().setVolume(bgm_volume_backup);
|
||||||
ResetInstallFolders();
|
SyncRealTimeWidgetstoConfig();
|
||||||
}
|
}
|
||||||
if (Common::Log::IsActive()) {
|
if (Common::Log::IsActive()) {
|
||||||
Common::Log::Filter filter;
|
Common::Log::Filter filter;
|
||||||
@ -170,6 +174,12 @@ SettingsDialog::SettingsDialog(std::shared_ptr<gui_settings> gui_settings,
|
|||||||
|
|
||||||
// GENERAL TAB
|
// GENERAL TAB
|
||||||
{
|
{
|
||||||
|
connect(ui->horizontalVolumeSlider, &QSlider::valueChanged, this, [this](int value) {
|
||||||
|
VolumeSliderChange(value);
|
||||||
|
Config::setVolumeSlider(value);
|
||||||
|
Libraries::AudioOut::AdjustVol();
|
||||||
|
});
|
||||||
|
|
||||||
#ifdef ENABLE_UPDATER
|
#ifdef ENABLE_UPDATER
|
||||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0))
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0))
|
||||||
connect(ui->updateCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
|
connect(ui->updateCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
|
||||||
@ -398,6 +408,8 @@ void SettingsDialog::closeEvent(QCloseEvent* event) {
|
|||||||
if (!is_saving) {
|
if (!is_saving) {
|
||||||
ui->backgroundImageOpacitySlider->setValue(backgroundImageOpacitySlider_backup);
|
ui->backgroundImageOpacitySlider->setValue(backgroundImageOpacitySlider_backup);
|
||||||
emit BackgroundOpacityChanged(backgroundImageOpacitySlider_backup);
|
emit BackgroundOpacityChanged(backgroundImageOpacitySlider_backup);
|
||||||
|
ui->horizontalVolumeSlider->setValue(volume_slider_backup);
|
||||||
|
Config::setVolumeSlider(volume_slider_backup);
|
||||||
ui->BGMVolumeSlider->setValue(bgm_volume_backup);
|
ui->BGMVolumeSlider->setValue(bgm_volume_backup);
|
||||||
BackgroundMusicPlayer::getInstance().setVolume(bgm_volume_backup);
|
BackgroundMusicPlayer::getInstance().setVolume(bgm_volume_backup);
|
||||||
}
|
}
|
||||||
@ -463,6 +475,8 @@ void SettingsDialog::LoadValuesFromConfig() {
|
|||||||
ui->radioButton_Bottom->setChecked(side == "bottom");
|
ui->radioButton_Bottom->setChecked(side == "bottom");
|
||||||
|
|
||||||
ui->BGMVolumeSlider->setValue(m_gui_settings->GetValue(gui::gl_backgroundMusicVolume).toInt());
|
ui->BGMVolumeSlider->setValue(m_gui_settings->GetValue(gui::gl_backgroundMusicVolume).toInt());
|
||||||
|
ui->horizontalVolumeSlider->setValue(m_gui_settings->GetValue(gui::gl_VolumeSlider).toInt());
|
||||||
|
ui->volumeText->setText(QString::number(ui->horizontalVolumeSlider->sliderPosition()) + "%");
|
||||||
ui->discordRPCCheckbox->setChecked(
|
ui->discordRPCCheckbox->setChecked(
|
||||||
toml::find_or<bool>(data, "General", "enableDiscordRPC", true));
|
toml::find_or<bool>(data, "General", "enableDiscordRPC", true));
|
||||||
QString translatedText_FullscreenMode =
|
QString translatedText_FullscreenMode =
|
||||||
@ -532,7 +546,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
|||||||
toml::find_or<bool>(data, "Input", "isMotionControlsEnabled", true));
|
toml::find_or<bool>(data, "Input", "isMotionControlsEnabled", true));
|
||||||
|
|
||||||
ui->removeFolderButton->setEnabled(!ui->gameFoldersListWidget->selectedItems().isEmpty());
|
ui->removeFolderButton->setEnabled(!ui->gameFoldersListWidget->selectedItems().isEmpty());
|
||||||
ResetInstallFolders();
|
SyncRealTimeWidgetstoConfig();
|
||||||
ui->backgroundImageOpacitySlider->setValue(
|
ui->backgroundImageOpacitySlider->setValue(
|
||||||
m_gui_settings->GetValue(gui::gl_backgroundImageOpacity).toInt());
|
m_gui_settings->GetValue(gui::gl_backgroundImageOpacity).toInt());
|
||||||
ui->showBackgroundImageCheckBox->setChecked(
|
ui->showBackgroundImageCheckBox->setChecked(
|
||||||
@ -541,6 +555,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
|||||||
backgroundImageOpacitySlider_backup =
|
backgroundImageOpacitySlider_backup =
|
||||||
m_gui_settings->GetValue(gui::gl_backgroundImageOpacity).toInt();
|
m_gui_settings->GetValue(gui::gl_backgroundImageOpacity).toInt();
|
||||||
bgm_volume_backup = m_gui_settings->GetValue(gui::gl_backgroundMusicVolume).toInt();
|
bgm_volume_backup = m_gui_settings->GetValue(gui::gl_backgroundMusicVolume).toInt();
|
||||||
|
volume_slider_backup = m_gui_settings->GetValue(gui::gl_VolumeSlider).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::InitializeEmulatorLanguages() {
|
void SettingsDialog::InitializeEmulatorLanguages() {
|
||||||
@ -599,6 +614,10 @@ void SettingsDialog::OnCursorStateChanged(s16 index) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsDialog::VolumeSliderChange(int value) {
|
||||||
|
ui->volumeText->setText(QString::number(ui->horizontalVolumeSlider->sliderPosition()) + "%");
|
||||||
|
}
|
||||||
|
|
||||||
int SettingsDialog::exec() {
|
int SettingsDialog::exec() {
|
||||||
return QDialog::exec();
|
return QDialog::exec();
|
||||||
}
|
}
|
||||||
@ -719,7 +738,6 @@ bool SettingsDialog::eventFilter(QObject* obj, QEvent* event) {
|
|||||||
if (qobject_cast<QWidget*>(obj)) {
|
if (qobject_cast<QWidget*>(obj)) {
|
||||||
bool hovered = (event->type() == QEvent::Enter);
|
bool hovered = (event->type() == QEvent::Enter);
|
||||||
QString elementName = obj->objectName();
|
QString elementName = obj->objectName();
|
||||||
|
|
||||||
if (hovered) {
|
if (hovered) {
|
||||||
updateNoteTextEdit(elementName);
|
updateNoteTextEdit(elementName);
|
||||||
} else {
|
} else {
|
||||||
@ -759,6 +777,7 @@ void SettingsDialog::UpdateSettings() {
|
|||||||
Config::setCursorState(ui->hideCursorComboBox->currentIndex());
|
Config::setCursorState(ui->hideCursorComboBox->currentIndex());
|
||||||
Config::setCursorHideTimeout(ui->idleTimeoutSpinBox->value());
|
Config::setCursorHideTimeout(ui->idleTimeoutSpinBox->value());
|
||||||
Config::setGpuId(ui->graphicsAdapterBox->currentIndex() - 1);
|
Config::setGpuId(ui->graphicsAdapterBox->currentIndex() - 1);
|
||||||
|
m_gui_settings->SetValue(gui::gl_VolumeSlider, ui->horizontalVolumeSlider->value());
|
||||||
m_gui_settings->SetValue(gui::gl_backgroundMusicVolume, ui->BGMVolumeSlider->value());
|
m_gui_settings->SetValue(gui::gl_backgroundMusicVolume, ui->BGMVolumeSlider->value());
|
||||||
Config::setLanguage(languageIndexes[ui->consoleLanguageComboBox->currentIndex()]);
|
Config::setLanguage(languageIndexes[ui->consoleLanguageComboBox->currentIndex()]);
|
||||||
Config::setEnableDiscordRPC(ui->discordRPCCheckbox->isChecked());
|
Config::setEnableDiscordRPC(ui->discordRPCCheckbox->isChecked());
|
||||||
@ -815,9 +834,10 @@ void SettingsDialog::UpdateSettings() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
BackgroundMusicPlayer::getInstance().setVolume(ui->BGMVolumeSlider->value());
|
BackgroundMusicPlayer::getInstance().setVolume(ui->BGMVolumeSlider->value());
|
||||||
|
Config::setVolumeSlider(ui->horizontalVolumeSlider->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::ResetInstallFolders() {
|
void SettingsDialog::SyncRealTimeWidgetstoConfig() {
|
||||||
ui->gameFoldersListWidget->clear();
|
ui->gameFoldersListWidget->clear();
|
||||||
|
|
||||||
std::filesystem::path userdir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
std::filesystem::path userdir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
||||||
@ -865,6 +885,7 @@ void SettingsDialog::setDefaultValues() {
|
|||||||
m_gui_settings->SetValue(gui::gl_backgroundImageOpacity, 50);
|
m_gui_settings->SetValue(gui::gl_backgroundImageOpacity, 50);
|
||||||
m_gui_settings->SetValue(gui::gl_playBackgroundMusic, false);
|
m_gui_settings->SetValue(gui::gl_playBackgroundMusic, false);
|
||||||
m_gui_settings->SetValue(gui::gl_backgroundMusicVolume, 50);
|
m_gui_settings->SetValue(gui::gl_backgroundMusicVolume, 50);
|
||||||
|
m_gui_settings->SetValue(gui::gl_VolumeSlider, 100);
|
||||||
m_gui_settings->SetValue(gui::gen_checkForUpdates, false);
|
m_gui_settings->SetValue(gui::gen_checkForUpdates, false);
|
||||||
m_gui_settings->SetValue(gui::gen_showChangeLog, false);
|
m_gui_settings->SetValue(gui::gen_showChangeLog, false);
|
||||||
if (Common::g_is_release) {
|
if (Common::g_is_release) {
|
||||||
@ -873,4 +894,4 @@ void SettingsDialog::setDefaultValues() {
|
|||||||
m_gui_settings->SetValue(gui::gen_updateChannel, "Nightly");
|
m_gui_settings->SetValue(gui::gen_updateChannel, "Nightly");
|
||||||
}
|
}
|
||||||
m_gui_settings->SetValue(gui::gen_guiLanguage, "en_US");
|
m_gui_settings->SetValue(gui::gen_guiLanguage, "en_US");
|
||||||
}
|
}
|
||||||
|
@ -39,12 +39,13 @@ signals:
|
|||||||
private:
|
private:
|
||||||
void LoadValuesFromConfig();
|
void LoadValuesFromConfig();
|
||||||
void UpdateSettings();
|
void UpdateSettings();
|
||||||
void ResetInstallFolders();
|
void SyncRealTimeWidgetstoConfig();
|
||||||
void InitializeEmulatorLanguages();
|
void InitializeEmulatorLanguages();
|
||||||
void OnLanguageChanged(int index);
|
void OnLanguageChanged(int index);
|
||||||
void OnCursorStateChanged(s16 index);
|
void OnCursorStateChanged(s16 index);
|
||||||
void closeEvent(QCloseEvent* event) override;
|
void closeEvent(QCloseEvent* event) override;
|
||||||
void setDefaultValues();
|
void setDefaultValues();
|
||||||
|
void VolumeSliderChange(int value);
|
||||||
|
|
||||||
std::unique_ptr<Ui::SettingsDialog> ui;
|
std::unique_ptr<Ui::SettingsDialog> ui;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>5</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QScrollArea" name="generalTab">
|
<widget class="QScrollArea" name="generalTab">
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
@ -73,8 +73,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>944</width>
|
||||||
<height>536</height>
|
<height>537</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
|
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
|
||||||
@ -86,148 +86,7 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="1">
|
<item row="2" column="0">
|
||||||
<layout class="QVBoxLayout" name="emulatorTabLayoutMiddle">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="emulatorSettingsGroupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Emulator</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="additionalSettingsVLayout" stretch="0">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="emulatorverticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="showSplashCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Show Splash</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="discordRPCCheckbox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable Discord Rich Presence</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<layout class="QVBoxLayout" name="systemTabLayoutLeft">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="SystemSettings">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="sizeIncrement">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>System</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="emuSettingsLayout">
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>70</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="consoleLanguageGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Console Language</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="settingsLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="consoleLanguageComboBox"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="emulatorLanguageGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Emulator Language</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="langSettingsLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="emulatorLanguageComboBox"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<spacer name="verticalSpacer_4">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
@ -240,8 +99,8 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="2" column="2">
|
||||||
<spacer name="verticalSpacer_5">
|
<spacer name="verticalSpacer_4">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -253,7 +112,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="3">
|
||||||
<layout class="QVBoxLayout" name="updaterTabLayoutLeft">
|
<layout class="QVBoxLayout" name="updaterTabLayoutLeft">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
@ -427,6 +286,228 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QVBoxLayout" name="systemTabLayoutLeft">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="SystemSettings">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>System</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="emuSettingsLayout">
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>70</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="consoleLanguageGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Console Language</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="settingsLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="consoleLanguageComboBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="emulatorLanguageGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Emulator Language</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="langSettingsLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="emulatorLanguageComboBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QGroupBox" name="volumeSliderElement">
|
||||||
|
<property name="title">
|
||||||
|
<string>Volume</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="volumeLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>414</width>
|
||||||
|
<height>69</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="volumeText">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>100%</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="horizontalVolumeSlider">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::FocusPolicy::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>500</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="sliderPosition">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<layout class="QVBoxLayout" name="emulatorTabLayoutMiddle">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="emulatorSettingsGroupBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Emulator</string>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="additionalSettingsVLayout" stretch="0">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="emulatorverticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="showSplashCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show Splash</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="discordRPCCheckbox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable Discord Rich Presence</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -444,8 +525,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>944</width>
|
||||||
<height>536</height>
|
<height>537</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="guiTabVLayout" stretch="0">
|
<layout class="QVBoxLayout" name="guiTabVLayout" stretch="0">
|
||||||
@ -700,7 +781,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_Volume">
|
<widget class="QLabel" name="label_Volume">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -893,8 +974,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>944</width>
|
||||||
<height>536</height>
|
<height>537</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
|
||||||
@ -1188,8 +1269,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>944</width>
|
||||||
<height>536</height>
|
<height>537</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="userTabVLayout" stretch="0,0,1">
|
<layout class="QVBoxLayout" name="userTabVLayout" stretch="0,0,1">
|
||||||
@ -1430,8 +1511,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>944</width>
|
||||||
<height>536</height>
|
<height>537</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
||||||
@ -1684,8 +1765,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>944</width>
|
||||||
<height>536</height>
|
<height>537</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="pathsTabLayout">
|
<layout class="QVBoxLayout" name="pathsTabLayout">
|
||||||
@ -1826,8 +1907,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>944</width>
|
||||||
<height>536</height>
|
<height>537</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,0">
|
||||||
|
Loading…
Reference in New Issue
Block a user