mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 16:52:46 +01:00
Rebase for per game settings
This commit is contained in:
parent
468bd9c1b0
commit
85d7a8f466
9 changed files with 53 additions and 1 deletions
|
@ -115,6 +115,8 @@ void LogSettings() {
|
||||||
values.use_asynchronous_gpu_emulation.GetValue());
|
values.use_asynchronous_gpu_emulation.GetValue());
|
||||||
log_setting("Renderer_UseVsync", values.use_vsync.GetValue());
|
log_setting("Renderer_UseVsync", values.use_vsync.GetValue());
|
||||||
log_setting("Renderer_UseAssemblyShaders", values.use_assembly_shaders.GetValue());
|
log_setting("Renderer_UseAssemblyShaders", values.use_assembly_shaders.GetValue());
|
||||||
|
log_setting("Renderer_UseAsynchronousShaders",
|
||||||
|
Settings::values.use_asynchronous_shaders.GetValue());
|
||||||
log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue());
|
log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue());
|
||||||
log_setting("Audio_OutputEngine", values.sink_id);
|
log_setting("Audio_OutputEngine", values.sink_id);
|
||||||
log_setting("Audio_EnableAudioStretching", values.enable_audio_stretching.GetValue());
|
log_setting("Audio_EnableAudioStretching", values.enable_audio_stretching.GetValue());
|
||||||
|
@ -170,6 +172,7 @@ void RestoreGlobalState() {
|
||||||
values.use_asynchronous_gpu_emulation.SetGlobal(true);
|
values.use_asynchronous_gpu_emulation.SetGlobal(true);
|
||||||
values.use_vsync.SetGlobal(true);
|
values.use_vsync.SetGlobal(true);
|
||||||
values.use_assembly_shaders.SetGlobal(true);
|
values.use_assembly_shaders.SetGlobal(true);
|
||||||
|
values.use_asynchronous_shaders.SetGlobal(true);
|
||||||
values.use_fast_gpu_time.SetGlobal(true);
|
values.use_fast_gpu_time.SetGlobal(true);
|
||||||
values.force_30fps_mode.SetGlobal(true);
|
values.force_30fps_mode.SetGlobal(true);
|
||||||
values.bg_red.SetGlobal(true);
|
values.bg_red.SetGlobal(true);
|
||||||
|
|
|
@ -434,6 +434,7 @@ struct Values {
|
||||||
Setting<bool> use_asynchronous_gpu_emulation;
|
Setting<bool> use_asynchronous_gpu_emulation;
|
||||||
Setting<bool> use_vsync;
|
Setting<bool> use_vsync;
|
||||||
Setting<bool> use_assembly_shaders;
|
Setting<bool> use_assembly_shaders;
|
||||||
|
Setting<bool> use_asynchronous_shaders;
|
||||||
Setting<bool> force_30fps_mode;
|
Setting<bool> force_30fps_mode;
|
||||||
Setting<bool> use_fast_gpu_time;
|
Setting<bool> use_fast_gpu_time;
|
||||||
|
|
||||||
|
|
|
@ -207,6 +207,8 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) {
|
||||||
AddField(field_type, "Renderer_UseVsync", Settings::values.use_vsync.GetValue());
|
AddField(field_type, "Renderer_UseVsync", Settings::values.use_vsync.GetValue());
|
||||||
AddField(field_type, "Renderer_UseAssemblyShaders",
|
AddField(field_type, "Renderer_UseAssemblyShaders",
|
||||||
Settings::values.use_assembly_shaders.GetValue());
|
Settings::values.use_assembly_shaders.GetValue());
|
||||||
|
AddField(field_type, "Renderer_UseAsynchronousShaders",
|
||||||
|
Settings::values.use_asynchronous_shaders.GetValue());
|
||||||
AddField(field_type, "System_UseDockedMode", Settings::values.use_docked_mode);
|
AddField(field_type, "System_UseDockedMode", Settings::values.use_docked_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ Device::Device()
|
||||||
GLAD_GL_NV_gpu_program5 && GLAD_GL_NV_compute_program5 &&
|
GLAD_GL_NV_gpu_program5 && GLAD_GL_NV_compute_program5 &&
|
||||||
GLAD_GL_NV_transform_feedback && GLAD_GL_NV_transform_feedback2;
|
GLAD_GL_NV_transform_feedback && GLAD_GL_NV_transform_feedback2;
|
||||||
|
|
||||||
use_asynchronous_shaders = Settings::values.use_asynchronous_shaders;
|
use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue();
|
||||||
|
|
||||||
LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi);
|
LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi);
|
||||||
LOG_INFO(Render_OpenGL, "Renderer_ComponentIndexingBug: {}", has_component_indexing_bug);
|
LOG_INFO(Render_OpenGL, "Renderer_ComponentIndexingBug: {}", has_component_indexing_bug);
|
||||||
|
|
|
@ -661,6 +661,8 @@ void Config::ReadRendererValues() {
|
||||||
ReadSettingGlobal(Settings::values.use_vsync, QStringLiteral("use_vsync"), true);
|
ReadSettingGlobal(Settings::values.use_vsync, QStringLiteral("use_vsync"), true);
|
||||||
ReadSettingGlobal(Settings::values.use_assembly_shaders, QStringLiteral("use_assembly_shaders"),
|
ReadSettingGlobal(Settings::values.use_assembly_shaders, QStringLiteral("use_assembly_shaders"),
|
||||||
false);
|
false);
|
||||||
|
ReadSettingGlobal(Settings::values.use_asynchronous_shaders,
|
||||||
|
QStringLiteral("use_asynchronous_shaders"), false);
|
||||||
ReadSettingGlobal(Settings::values.use_fast_gpu_time, QStringLiteral("use_fast_gpu_time"),
|
ReadSettingGlobal(Settings::values.use_fast_gpu_time, QStringLiteral("use_fast_gpu_time"),
|
||||||
true);
|
true);
|
||||||
ReadSettingGlobal(Settings::values.force_30fps_mode, QStringLiteral("force_30fps_mode"), false);
|
ReadSettingGlobal(Settings::values.force_30fps_mode, QStringLiteral("force_30fps_mode"), false);
|
||||||
|
@ -1145,6 +1147,10 @@ void Config::SaveRendererValues() {
|
||||||
WriteSettingGlobal(QStringLiteral("use_vsync"), Settings::values.use_vsync, true);
|
WriteSettingGlobal(QStringLiteral("use_vsync"), Settings::values.use_vsync, true);
|
||||||
WriteSettingGlobal(QStringLiteral("use_assembly_shaders"),
|
WriteSettingGlobal(QStringLiteral("use_assembly_shaders"),
|
||||||
Settings::values.use_assembly_shaders, false);
|
Settings::values.use_assembly_shaders, false);
|
||||||
|
WriteSettingGlobal(QStringLiteral("use_asynchronous_shaders"),
|
||||||
|
Settings::values.use_asynchronous_shaders, false);
|
||||||
|
WriteSettingGlobal(QStringLiteral("use_asynchronous_shaders"),
|
||||||
|
Settings::values.use_asynchronous_shaders, false);
|
||||||
WriteSettingGlobal(QStringLiteral("use_fast_gpu_time"), Settings::values.use_fast_gpu_time,
|
WriteSettingGlobal(QStringLiteral("use_fast_gpu_time"), Settings::values.use_fast_gpu_time,
|
||||||
true);
|
true);
|
||||||
WriteSettingGlobal(QStringLiteral("force_30fps_mode"), Settings::values.force_30fps_mode,
|
WriteSettingGlobal(QStringLiteral("force_30fps_mode"), Settings::values.force_30fps_mode,
|
||||||
|
|
|
@ -24,6 +24,7 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||||
const bool runtime_lock = !Core::System::GetInstance().IsPoweredOn();
|
const bool runtime_lock = !Core::System::GetInstance().IsPoweredOn();
|
||||||
ui->use_vsync->setEnabled(runtime_lock);
|
ui->use_vsync->setEnabled(runtime_lock);
|
||||||
ui->use_assembly_shaders->setEnabled(runtime_lock);
|
ui->use_assembly_shaders->setEnabled(runtime_lock);
|
||||||
|
ui->use_asynchronous_shaders->setEnabled(runtime_lock);
|
||||||
ui->force_30fps_mode->setEnabled(runtime_lock);
|
ui->force_30fps_mode->setEnabled(runtime_lock);
|
||||||
ui->anisotropic_filtering_combobox->setEnabled(runtime_lock);
|
ui->anisotropic_filtering_combobox->setEnabled(runtime_lock);
|
||||||
|
|
||||||
|
@ -32,6 +33,8 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||||
static_cast<int>(Settings::values.gpu_accuracy.GetValue()));
|
static_cast<int>(Settings::values.gpu_accuracy.GetValue()));
|
||||||
ui->use_vsync->setChecked(Settings::values.use_vsync.GetValue());
|
ui->use_vsync->setChecked(Settings::values.use_vsync.GetValue());
|
||||||
ui->use_assembly_shaders->setChecked(Settings::values.use_assembly_shaders.GetValue());
|
ui->use_assembly_shaders->setChecked(Settings::values.use_assembly_shaders.GetValue());
|
||||||
|
ui->use_asynchronous_shaders->setChecked(
|
||||||
|
Settings::values.use_asynchronous_shaders.GetValue());
|
||||||
ui->use_fast_gpu_time->setChecked(Settings::values.use_fast_gpu_time.GetValue());
|
ui->use_fast_gpu_time->setChecked(Settings::values.use_fast_gpu_time.GetValue());
|
||||||
ui->force_30fps_mode->setChecked(Settings::values.force_30fps_mode.GetValue());
|
ui->force_30fps_mode->setChecked(Settings::values.force_30fps_mode.GetValue());
|
||||||
ui->anisotropic_filtering_combobox->setCurrentIndex(
|
ui->anisotropic_filtering_combobox->setCurrentIndex(
|
||||||
|
@ -41,6 +44,10 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||||
ConfigurationShared::SetPerGameSetting(ui->use_vsync, &Settings::values.use_vsync);
|
ConfigurationShared::SetPerGameSetting(ui->use_vsync, &Settings::values.use_vsync);
|
||||||
ConfigurationShared::SetPerGameSetting(ui->use_assembly_shaders,
|
ConfigurationShared::SetPerGameSetting(ui->use_assembly_shaders,
|
||||||
&Settings::values.use_assembly_shaders);
|
&Settings::values.use_assembly_shaders);
|
||||||
|
ConfigurationShared::SetPerGameSetting(ui->use_asynchronous_shaders,
|
||||||
|
&Settings::values.use_asynchronous_shaders);
|
||||||
|
ConfigurationShared::SetPerGameSetting(ui->use_asynchronous_shaders,
|
||||||
|
&Settings::values.use_asynchronous_shaders);
|
||||||
ConfigurationShared::SetPerGameSetting(ui->use_fast_gpu_time,
|
ConfigurationShared::SetPerGameSetting(ui->use_fast_gpu_time,
|
||||||
&Settings::values.use_fast_gpu_time);
|
&Settings::values.use_fast_gpu_time);
|
||||||
ConfigurationShared::SetPerGameSetting(ui->force_30fps_mode,
|
ConfigurationShared::SetPerGameSetting(ui->force_30fps_mode,
|
||||||
|
@ -67,6 +74,14 @@ void ConfigureGraphicsAdvanced::ApplyConfiguration() {
|
||||||
if (Settings::values.use_assembly_shaders.UsingGlobal()) {
|
if (Settings::values.use_assembly_shaders.UsingGlobal()) {
|
||||||
Settings::values.use_assembly_shaders.SetValue(ui->use_assembly_shaders->isChecked());
|
Settings::values.use_assembly_shaders.SetValue(ui->use_assembly_shaders->isChecked());
|
||||||
}
|
}
|
||||||
|
if (Settings::values.use_asynchronous_shaders.UsingGlobal()) {
|
||||||
|
Settings::values.use_asynchronous_shaders.SetValue(
|
||||||
|
ui->use_asynchronous_shaders->isChecked());
|
||||||
|
}
|
||||||
|
if (Settings::values.use_asynchronous_shaders.UsingGlobal()) {
|
||||||
|
Settings::values.use_asynchronous_shaders.SetValue(
|
||||||
|
ui->use_asynchronous_shaders->isChecked());
|
||||||
|
}
|
||||||
if (Settings::values.use_fast_gpu_time.UsingGlobal()) {
|
if (Settings::values.use_fast_gpu_time.UsingGlobal()) {
|
||||||
Settings::values.use_fast_gpu_time.SetValue(ui->use_fast_gpu_time->isChecked());
|
Settings::values.use_fast_gpu_time.SetValue(ui->use_fast_gpu_time->isChecked());
|
||||||
}
|
}
|
||||||
|
@ -83,6 +98,10 @@ void ConfigureGraphicsAdvanced::ApplyConfiguration() {
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync, ui->use_vsync);
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync, ui->use_vsync);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_assembly_shaders,
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_assembly_shaders,
|
||||||
ui->use_assembly_shaders);
|
ui->use_assembly_shaders);
|
||||||
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_asynchronous_shaders,
|
||||||
|
ui->use_asynchronous_shaders);
|
||||||
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_asynchronous_shaders,
|
||||||
|
ui->use_asynchronous_shaders);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_fast_gpu_time,
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_fast_gpu_time,
|
||||||
ui->use_fast_gpu_time);
|
ui->use_fast_gpu_time);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.force_30fps_mode,
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.force_30fps_mode,
|
||||||
|
@ -117,6 +136,8 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() {
|
||||||
ui->gpu_accuracy->setEnabled(Settings::values.gpu_accuracy.UsingGlobal());
|
ui->gpu_accuracy->setEnabled(Settings::values.gpu_accuracy.UsingGlobal());
|
||||||
ui->use_vsync->setEnabled(Settings::values.use_vsync.UsingGlobal());
|
ui->use_vsync->setEnabled(Settings::values.use_vsync.UsingGlobal());
|
||||||
ui->use_assembly_shaders->setEnabled(Settings::values.use_assembly_shaders.UsingGlobal());
|
ui->use_assembly_shaders->setEnabled(Settings::values.use_assembly_shaders.UsingGlobal());
|
||||||
|
ui->use_asynchronous_shaders->setEnabled(
|
||||||
|
Settings::values.use_asynchronous_shaders.UsingGlobal());
|
||||||
ui->use_fast_gpu_time->setEnabled(Settings::values.use_fast_gpu_time.UsingGlobal());
|
ui->use_fast_gpu_time->setEnabled(Settings::values.use_fast_gpu_time.UsingGlobal());
|
||||||
ui->force_30fps_mode->setEnabled(Settings::values.force_30fps_mode.UsingGlobal());
|
ui->force_30fps_mode->setEnabled(Settings::values.force_30fps_mode.UsingGlobal());
|
||||||
ui->anisotropic_filtering_combobox->setEnabled(
|
ui->anisotropic_filtering_combobox->setEnabled(
|
||||||
|
@ -128,6 +149,7 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() {
|
||||||
ConfigurationShared::InsertGlobalItem(ui->gpu_accuracy);
|
ConfigurationShared::InsertGlobalItem(ui->gpu_accuracy);
|
||||||
ui->use_vsync->setTristate(true);
|
ui->use_vsync->setTristate(true);
|
||||||
ui->use_assembly_shaders->setTristate(true);
|
ui->use_assembly_shaders->setTristate(true);
|
||||||
|
ui->use_asynchronous_shaders->setTristate(true);
|
||||||
ui->use_fast_gpu_time->setTristate(true);
|
ui->use_fast_gpu_time->setTristate(true);
|
||||||
ui->force_30fps_mode->setTristate(true);
|
ui->force_30fps_mode->setTristate(true);
|
||||||
ConfigurationShared::InsertGlobalItem(ui->anisotropic_filtering_combobox);
|
ConfigurationShared::InsertGlobalItem(ui->anisotropic_filtering_combobox);
|
||||||
|
|
|
@ -72,6 +72,16 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="use_asynchronous_shaders">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Enables asynchronous shader compilation, which may reduce shader stutter. This feature is experimental.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Use asynchronous shader building (experimental, OpenGL or Assembly shaders only)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="force_30fps_mode">
|
<widget class="QCheckBox" name="force_30fps_mode">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
|
@ -394,6 +394,10 @@ void Config::ReadValues() {
|
||||||
static_cast<u16>(sdl2_config->GetInteger("Renderer", "use_vsync", 1)));
|
static_cast<u16>(sdl2_config->GetInteger("Renderer", "use_vsync", 1)));
|
||||||
Settings::values.use_assembly_shaders.SetValue(
|
Settings::values.use_assembly_shaders.SetValue(
|
||||||
sdl2_config->GetBoolean("Renderer", "use_assembly_shaders", false));
|
sdl2_config->GetBoolean("Renderer", "use_assembly_shaders", false));
|
||||||
|
Settings::values.use_asynchronous_shaders.SetValue(
|
||||||
|
sdl2_config->GetBoolean("Renderer", "use_asynchronous_shaders", false));
|
||||||
|
Settings::values.use_asynchronous_shaders.SetValue(
|
||||||
|
sdl2_config->GetBoolean("Renderer", "use_asynchronous_shaders", false));
|
||||||
Settings::values.use_fast_gpu_time.SetValue(
|
Settings::values.use_fast_gpu_time.SetValue(
|
||||||
sdl2_config->GetBoolean("Renderer", "use_fast_gpu_time", true));
|
sdl2_config->GetBoolean("Renderer", "use_fast_gpu_time", true));
|
||||||
|
|
||||||
|
|
|
@ -166,6 +166,10 @@ use_vsync =
|
||||||
# 0 (default): Off, 1: On
|
# 0 (default): Off, 1: On
|
||||||
use_assembly_shaders =
|
use_assembly_shaders =
|
||||||
|
|
||||||
|
# Whether to allow asynchronous shader building.
|
||||||
|
# 0 (default): Off, 1: On
|
||||||
|
use_asynchronous_shaders =
|
||||||
|
|
||||||
# Turns on the frame limiter, which will limit frames output to the target game speed
|
# Turns on the frame limiter, which will limit frames output to the target game speed
|
||||||
# 0: Off, 1: On (default)
|
# 0: Off, 1: On (default)
|
||||||
use_frame_limit =
|
use_frame_limit =
|
||||||
|
|
Loading…
Reference in a new issue