mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 01:52:29 -06:00
Add frontend settings
This commit is contained in:
parent
b5b6ce5fdc
commit
ce3f8bf94e
5 changed files with 17 additions and 2 deletions
|
@ -122,6 +122,8 @@ void Config::ReadValues() {
|
||||||
Settings::values.resolution_factor =
|
Settings::values.resolution_factor =
|
||||||
static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1));
|
static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1));
|
||||||
Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true);
|
Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true);
|
||||||
|
Settings::values.use_disk_shader_cache =
|
||||||
|
sdl2_config->GetBoolean("Renderer", "use_disk_shader_cache", true);
|
||||||
Settings::values.frame_limit =
|
Settings::values.frame_limit =
|
||||||
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));
|
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));
|
||||||
Settings::values.use_vsync_new =
|
Settings::values.use_vsync_new =
|
||||||
|
|
|
@ -117,6 +117,10 @@ use_shader_jit =
|
||||||
# 0: Off, 1 (default): On
|
# 0: Off, 1 (default): On
|
||||||
use_vsync_new =
|
use_vsync_new =
|
||||||
|
|
||||||
|
# Reduce stuttering by storing and loading generated shaders to disk
|
||||||
|
# 0: Off, 1 (default. On)
|
||||||
|
use_disk_shader_cache =
|
||||||
|
|
||||||
# Resolution scale factor
|
# Resolution scale factor
|
||||||
# 0: Auto (scales resolution to window size), 1: Native 3DS screen resolution, Otherwise a scale
|
# 0: Auto (scales resolution to window size), 1: Native 3DS screen resolution, Otherwise a scale
|
||||||
# factor for the 3DS resolution
|
# factor for the 3DS resolution
|
||||||
|
|
|
@ -239,7 +239,7 @@ void Config::ReadUtilityValues() {
|
||||||
Settings::values.dump_textures = ReadSetting("dump_textures", false).toBool();
|
Settings::values.dump_textures = ReadSetting("dump_textures", false).toBool();
|
||||||
Settings::values.custom_textures = ReadSetting("custom_textures", false).toBool();
|
Settings::values.custom_textures = ReadSetting("custom_textures", false).toBool();
|
||||||
Settings::values.preload_textures = ReadSetting("preload_textures", false).toBool();
|
Settings::values.preload_textures = ReadSetting("preload_textures", false).toBool();
|
||||||
Settings::values.use_disk_shader_cache = ReadSetting("use_disk_shader_cache", false).toBool();
|
Settings::values.use_disk_shader_cache = ReadSetting("use_disk_shader_cache", true).toBool();
|
||||||
|
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
}
|
}
|
||||||
|
@ -714,7 +714,7 @@ void Config::SaveUtilityValues() {
|
||||||
WriteSetting("dump_textures", Settings::values.dump_textures, false);
|
WriteSetting("dump_textures", Settings::values.dump_textures, false);
|
||||||
WriteSetting("custom_textures", Settings::values.custom_textures, false);
|
WriteSetting("custom_textures", Settings::values.custom_textures, false);
|
||||||
WriteSetting("preload_textures", Settings::values.preload_textures, false);
|
WriteSetting("preload_textures", Settings::values.preload_textures, false);
|
||||||
WriteSetting("use_disk_shader_cache", Settings::values.use_disk_shader_cache, false);
|
WriteSetting("use_disk_shader_cache", Settings::values.use_disk_shader_cache, true);
|
||||||
|
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ void ConfigureEnhancements::SetConfiguration() {
|
||||||
ui->toggle_linear_filter->setChecked(Settings::values.filter_mode);
|
ui->toggle_linear_filter->setChecked(Settings::values.filter_mode);
|
||||||
ui->layout_combobox->setCurrentIndex(static_cast<int>(Settings::values.layout_option));
|
ui->layout_combobox->setCurrentIndex(static_cast<int>(Settings::values.layout_option));
|
||||||
ui->swap_screen->setChecked(Settings::values.swap_screen);
|
ui->swap_screen->setChecked(Settings::values.swap_screen);
|
||||||
|
ui->toggle_disk_shader_cache->setChecked(Settings::values.use_disk_shader_cache);
|
||||||
ui->toggle_dump_textures->setChecked(Settings::values.dump_textures);
|
ui->toggle_dump_textures->setChecked(Settings::values.dump_textures);
|
||||||
ui->toggle_custom_textures->setChecked(Settings::values.custom_textures);
|
ui->toggle_custom_textures->setChecked(Settings::values.custom_textures);
|
||||||
ui->toggle_preload_textures->setChecked(Settings::values.preload_textures);
|
ui->toggle_preload_textures->setChecked(Settings::values.preload_textures);
|
||||||
|
@ -97,6 +98,7 @@ void ConfigureEnhancements::ApplyConfiguration() {
|
||||||
Settings::values.layout_option =
|
Settings::values.layout_option =
|
||||||
static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex());
|
static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex());
|
||||||
Settings::values.swap_screen = ui->swap_screen->isChecked();
|
Settings::values.swap_screen = ui->swap_screen->isChecked();
|
||||||
|
Settings::values.use_disk_shader_cache = ui->toggle_disk_shader_cache->isChecked();
|
||||||
Settings::values.dump_textures = ui->toggle_dump_textures->isChecked();
|
Settings::values.dump_textures = ui->toggle_dump_textures->isChecked();
|
||||||
Settings::values.custom_textures = ui->toggle_custom_textures->isChecked();
|
Settings::values.custom_textures = ui->toggle_custom_textures->isChecked();
|
||||||
Settings::values.preload_textures = ui->toggle_preload_textures->isChecked();
|
Settings::values.preload_textures = ui->toggle_preload_textures->isChecked();
|
||||||
|
|
|
@ -264,6 +264,13 @@
|
||||||
<string>Utility</string>
|
<string>Utility</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="toggle_disk_shader_cache">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use Disk Shader Cache</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="toggle_custom_textures">
|
<widget class="QCheckBox" name="toggle_custom_textures">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
|
Loading…
Reference in a new issue