[desktop, settings] new RendererHacks category, move to Extensions -> Extras, fix GPU accuracy naming (#3245)
added a new RendererHacks category, moved them to the Extensions tab and renamed that tab Extras. Should fit in smaller screens now also Performance -> Fast, GPU Accuracy -> GPU Mode Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3245 Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
d9874fa4bc
commit
73f2535edc
|
|
@ -306,6 +306,7 @@ abstract class SettingsItem(
|
|||
SingleChoiceSetting(
|
||||
IntSetting.RENDERER_ACCURACY,
|
||||
titleId = R.string.renderer_accuracy,
|
||||
descriptionId = R.string.renderer_accuracy_description,
|
||||
choicesId = R.array.rendererAccuracyNames,
|
||||
valuesId = R.array.rendererAccuracyValues
|
||||
)
|
||||
|
|
|
|||
|
|
@ -473,7 +473,8 @@
|
|||
|
||||
<string name="advanced">Advanced</string>
|
||||
|
||||
<string name="renderer_accuracy">Accuracy level</string>
|
||||
<string name="renderer_accuracy">GPU Mode</string>
|
||||
<string name="renderer_accuracy_description">Controls the GPU emulation mode. Most games render fine with Fast or Balanced modes, but Accurate is still required for some. Particles tend to only render correctly with Accurate mode.</string>
|
||||
<string name="dma_accuracy">DMA Accuracy</string>
|
||||
<string name="dma_accuracy_description">Controls the DMA precision accuracy. Safe precision can fix issues in some games, but it can also impact performance in some cases. If unsure, leave this on Default.</string>
|
||||
<string name="anisotropic_filtering">Anisotropic filtering</string>
|
||||
|
|
@ -721,18 +722,12 @@
|
|||
<!-- Custom Paths settings -->
|
||||
<string name="custom_save_directory">Save Data Directory</string>
|
||||
<string name="custom_save_directory_description">Set a custom path for save data storage</string>
|
||||
<string name="select_directory">Select Directory</string>
|
||||
<string name="choose_save_directory_action">Choose an action for the save directory:</string>
|
||||
<string name="set_custom_path">Set Custom Path</string>
|
||||
<string name="reset_to_nand">Reset to Default</string>
|
||||
<string name="migrate_save_data">Migrate Save Data</string>
|
||||
<string name="migrate_save_data_question">Do you want to migrate existing save data to the new location?</string>
|
||||
<string name="migrate_save_data_description">This will copy your save files from the old location to the new one.</string>
|
||||
<string name="migrating_save_data">Migrating save data…</string>
|
||||
<string name="save_migration_complete">Save data migrated successfully</string>
|
||||
<string name="save_migration_failed">Save data migration failed</string>
|
||||
<string name="save_directory_set">Save directory set</string>
|
||||
<string name="save_directory_reset">Save directory reset to default</string>
|
||||
<string name="destination_has_saves">The destination already contains data. Do you want to overwrite it?</string>
|
||||
<string name="all_files_permission_required">All Files Access permission is required for custom paths</string>
|
||||
<string name="grant_permission">Grant Permission</string>
|
||||
|
|
@ -970,7 +965,7 @@
|
|||
<string name="renderer_none">None</string>
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">Performance</string>
|
||||
<string name="renderer_accuracy_low">Fast</string>
|
||||
<string name="renderer_accuracy_medium">Balanced</string>
|
||||
<string name="renderer_accuracy_high">Accurate</string>
|
||||
|
||||
|
|
|
|||
|
|
@ -231,6 +231,7 @@ const char* TranslateCategory(Category category) {
|
|||
return "Overlay";
|
||||
case Category::Renderer:
|
||||
case Category::RendererAdvanced:
|
||||
case Category::RendererHacks:
|
||||
case Category::RendererDebug:
|
||||
case Category::RendererExtensions:
|
||||
return "Renderer";
|
||||
|
|
|
|||
|
|
@ -492,13 +492,13 @@ struct Values {
|
|||
SwitchableSetting<GpuOverclock> fast_gpu_time{linkage,
|
||||
GpuOverclock::Medium,
|
||||
"fast_gpu_time",
|
||||
Category::RendererAdvanced,
|
||||
Category::RendererHacks,
|
||||
Specialization::Default};
|
||||
|
||||
SwitchableSetting<bool> skip_cpu_inner_invalidation{linkage,
|
||||
false,
|
||||
"skip_cpu_inner_invalidation",
|
||||
Category::RendererAdvanced,
|
||||
Category::RendererHacks,
|
||||
Specialization::Default,
|
||||
true,
|
||||
true};
|
||||
|
|
@ -508,10 +508,10 @@ struct Values {
|
|||
#else
|
||||
false,
|
||||
#endif
|
||||
"async_presentation", Category::RendererAdvanced};
|
||||
"async_presentation", Category::RendererHacks};
|
||||
|
||||
SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
|
||||
Category::RendererAdvanced};
|
||||
Category::RendererHacks};
|
||||
|
||||
SwitchableSetting<ExtendedDynamicState> dyna_state{linkage,
|
||||
#if defined (_WIN32)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ enum class Category : u32 {
|
|||
Overlay,
|
||||
Renderer,
|
||||
RendererAdvanced,
|
||||
RendererHacks,
|
||||
RendererExtensions,
|
||||
RendererDebug,
|
||||
System,
|
||||
|
|
|
|||
|
|
@ -368,6 +368,7 @@ void Config::ReadRendererValues() {
|
|||
|
||||
ReadCategory(Settings::Category::Renderer);
|
||||
ReadCategory(Settings::Category::RendererAdvanced);
|
||||
ReadCategory(Settings::Category::RendererHacks);
|
||||
ReadCategory(Settings::Category::RendererExtensions);
|
||||
ReadCategory(Settings::Category::RendererDebug);
|
||||
|
||||
|
|
@ -671,6 +672,7 @@ void Config::SaveRendererValues() {
|
|||
|
||||
WriteCategory(Settings::Category::Renderer);
|
||||
WriteCategory(Settings::Category::RendererAdvanced);
|
||||
WriteCategory(Settings::Category::RendererHacks);
|
||||
WriteCategory(Settings::Category::RendererExtensions);
|
||||
WriteCategory(Settings::Category::RendererDebug);
|
||||
|
||||
|
|
|
|||
|
|
@ -272,8 +272,8 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent)
|
|||
tr("Controls the quality of texture rendering at oblique angles.\nSafe to set at 16x on most GPUs."));
|
||||
INSERT(Settings,
|
||||
gpu_accuracy,
|
||||
tr("GPU Accuracy:"),
|
||||
tr("Controls the GPU emulation accuracy.\nMost games render fine with Performance or Balanced modes, but Accurate is still "
|
||||
tr("GPU Mode:"),
|
||||
tr("Controls the GPU emulation mode.\nMost games render fine with Fast or Balanced modes, but Accurate is still "
|
||||
"required for some.\nParticles tend to only render correctly with Accurate mode."));
|
||||
INSERT(Settings,
|
||||
dma_accuracy,
|
||||
|
|
@ -321,7 +321,7 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent)
|
|||
// Renderer (Extensions)
|
||||
INSERT(Settings, dyna_state, tr("Extended Dynamic State"),
|
||||
tr("Controls the number of features that can be used in Extended Dynamic State.\n"
|
||||
"Higher numbers allow for more features and can increase performance, but may cause "
|
||||
"Higher states allow for more features and can increase performance, but may cause "
|
||||
"additional graphical issues."));
|
||||
|
||||
INSERT(Settings,
|
||||
|
|
@ -499,7 +499,7 @@ std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent)
|
|||
}});
|
||||
translations->insert({Settings::EnumMetadata<Settings::GpuAccuracy>::Index(),
|
||||
{
|
||||
PAIR(GpuAccuracy, Low, tr("Performance")),
|
||||
PAIR(GpuAccuracy, Low, tr("Fast")),
|
||||
PAIR(GpuAccuracy, Medium, tr("Balanced")),
|
||||
PAIR(GpuAccuracy, High, tr("Accurate")),
|
||||
}});
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ static const std::map<Settings::ConsoleMode, QString> use_docked_mode_texts_map
|
|||
};
|
||||
|
||||
static const std::map<Settings::GpuAccuracy, QString> gpu_accuracy_texts_map = {
|
||||
{Settings::GpuAccuracy::Low, QStringLiteral(QT_TRANSLATE_NOOP("MainWindow", "Performance"))},
|
||||
{Settings::GpuAccuracy::Low, QStringLiteral(QT_TRANSLATE_NOOP("MainWindow", "Fast"))},
|
||||
{Settings::GpuAccuracy::Medium, QStringLiteral(QT_TRANSLATE_NOOP("MainWindow", "Balanced"))},
|
||||
{Settings::GpuAccuracy::High, QStringLiteral(QT_TRANSLATE_NOOP("MainWindow", "Accurate"))},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ const std::array<Shortcut, 30> default_hotkeys{{
|
|||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Capture Screenshot")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+P"), std::string("Screenshot"), Qt::WidgetWithChildrenShortcut, false}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Change Adapting Filter")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F8"), std::string("Home+L"), Qt::ApplicationShortcut, false}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Change Docked Mode")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F10"), std::string("Home+X"), Qt::ApplicationShortcut, false}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Change GPU Accuracy")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F9"), std::string("Home+R"), Qt::ApplicationShortcut, false}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Change GPU Mode")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F9"), std::string("Home+R"), Qt::ApplicationShortcut, false}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Configure")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+,"), std::string(""), Qt::WidgetWithChildrenShortcut, false}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Configure Current Game")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+."), std::string(""), Qt::WidgetWithChildrenShortcut, false}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Continue/Pause Emulation")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F4"), std::string("Home+Plus"), Qt::WindowShortcut, false}},
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
|||
ui->tabWidget->addTab(general_tab.get(), tr("General"));
|
||||
ui->tabWidget->addTab(graphics_tab.get(), tr("Graphics"));
|
||||
ui->tabWidget->addTab(graphics_advanced_tab.get(), tr("GraphicsAdvanced"));
|
||||
ui->tabWidget->addTab(graphics_extensions_tab.get(), tr("GraphicsExtensions"));
|
||||
ui->tabWidget->addTab(graphics_extensions_tab.get(), tr("GraphicsExtra"));
|
||||
ui->tabWidget->addTab(hotkeys_tab.get(), tr("Hotkeys"));
|
||||
ui->tabWidget->addTab(input_tab.get(), tr("Controls"));
|
||||
ui->tabWidget->addTab(profile_tab.get(), tr("Profiles"));
|
||||
|
|
|
|||
|
|
@ -35,17 +35,9 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {}
|
|||
|
||||
void ConfigureGraphicsAdvanced::Setup(const ConfigurationShared::Builder& builder) {
|
||||
auto& normal_layout = *ui->normal_target->layout();
|
||||
auto& hacks_layout = *ui->hacks_target->layout();
|
||||
|
||||
// A map will sort the data for us
|
||||
std::map<u32, QWidget*> normal_hold{};
|
||||
std::map<u32, QWidget*> hacks_hold{};
|
||||
|
||||
// These options are hacks and should probably be changed with caution.
|
||||
// TODO(crueter) maybe make a separate category RendererHacks?
|
||||
QList<u32> hacks = {
|
||||
Settings::values.skip_cpu_inner_invalidation.Id(), Settings::values.async_presentation.Id(),
|
||||
Settings::values.use_asynchronous_shaders.Id(), Settings::values.fast_gpu_time.Id()};
|
||||
|
||||
for (auto setting :
|
||||
Settings::values.linkage.by_category[Settings::Category::RendererAdvanced]) {
|
||||
|
|
@ -61,11 +53,7 @@ void ConfigureGraphicsAdvanced::Setup(const ConfigurationShared::Builder& builde
|
|||
|
||||
const auto id = setting->Id();
|
||||
|
||||
if (hacks.contains(id)) {
|
||||
hacks_hold.emplace(id, widget);
|
||||
} else {
|
||||
normal_hold.emplace(id, widget);
|
||||
}
|
||||
|
||||
// Keep track of enable_compute_pipelines so we can display it when needed
|
||||
if (setting->Id() == Settings::values.enable_compute_pipelines.Id()) {
|
||||
|
|
@ -76,10 +64,6 @@ void ConfigureGraphicsAdvanced::Setup(const ConfigurationShared::Builder& builde
|
|||
for (const auto& [id, widget] : normal_hold) {
|
||||
normal_layout.addWidget(widget);
|
||||
}
|
||||
|
||||
for (const auto& [id, widget] : hacks_hold) {
|
||||
hacks_layout.addWidget(widget);
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigureGraphicsAdvanced::ApplyConfiguration() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>404</width>
|
||||
<width>465</width>
|
||||
<height>376</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -44,43 +44,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="hacks">
|
||||
<property name="title">
|
||||
<string>Hacks</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Changing these options from their default may cause issues. Novitii cavete!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="hacks_target" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ void ConfigureGraphicsExtensions::SetConfiguration() {}
|
|||
|
||||
void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& builder) {
|
||||
auto& layout = *ui->populate_target->layout();
|
||||
|
||||
std::map<u32, QWidget*> hold{}; // A map will sort the data for us
|
||||
|
||||
for (auto setting :
|
||||
|
|
@ -71,6 +72,28 @@ void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& buil
|
|||
for (const auto& [id, widget] : hold) {
|
||||
layout.addWidget(widget);
|
||||
}
|
||||
|
||||
auto& hacks = *ui->hacks_target->layout();
|
||||
std::map<u32, QWidget*> hacks_hold{}; // A map will sort the data for us
|
||||
|
||||
for (auto setting : Settings::values.linkage.by_category[Settings::Category::RendererHacks]) {
|
||||
auto* widget = builder.BuildWidget(setting, apply_funcs);
|
||||
|
||||
if (widget == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!widget->Valid()) {
|
||||
widget->deleteLater();
|
||||
continue;
|
||||
}
|
||||
|
||||
hacks_hold.emplace(setting->Id(), widget);
|
||||
}
|
||||
|
||||
for (const auto& [id, widget] : hacks_hold) {
|
||||
hacks.addWidget(widget);
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigureGraphicsExtensions::ApplyConfiguration() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>404</width>
|
||||
<width>465</width>
|
||||
<height>376</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -14,15 +14,52 @@
|
|||
<string>Form</string>
|
||||
</property>
|
||||
<property name="accessibleName">
|
||||
<string>Extensions</string>
|
||||
<string>Extras</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="hacks">
|
||||
<property name="title">
|
||||
<string>Hacks</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Changing these options from their default may cause issues. Novitii cavete!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="hacks_target" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_1">
|
||||
<property name="title">
|
||||
<string>Vulkan Extensions Settings</string>
|
||||
<string>Vulkan Extensions</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
|
|||
ui->tabWidget->addTab(cpu_tab.get(), tr("CPU"));
|
||||
ui->tabWidget->addTab(graphics_tab.get(), tr("Graphics"));
|
||||
ui->tabWidget->addTab(graphics_advanced_tab.get(), tr("Adv. Graphics"));
|
||||
ui->tabWidget->addTab(graphics_extensions_tab.get(), tr("GPU Extensions"));
|
||||
ui->tabWidget->addTab(graphics_extensions_tab.get(), tr("Ext. Graphics"));
|
||||
ui->tabWidget->addTab(audio_tab.get(), tr("Audio"));
|
||||
ui->tabWidget->addTab(input_tab.get(), tr("Input Profiles"));
|
||||
ui->tabWidget->addTab(network_tab.get(), tr("Network"));
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,7 @@ void MainWindow::InitializeHotkeys() {
|
|||
connect_shortcut(QStringLiteral("Change Adapting Filter"),
|
||||
&MainWindow::OnToggleAdaptingFilter);
|
||||
connect_shortcut(QStringLiteral("Change Docked Mode"), &MainWindow::OnToggleDockedMode);
|
||||
connect_shortcut(QStringLiteral("Change GPU Accuracy"), &MainWindow::OnToggleGpuAccuracy);
|
||||
connect_shortcut(QStringLiteral("Change GPU Mode"), &MainWindow::OnToggleGpuAccuracy);
|
||||
connect_shortcut(QStringLiteral("Audio Mute/Unmute"), &MainWindow::OnMute);
|
||||
connect_shortcut(QStringLiteral("Audio Volume Down"), &MainWindow::OnDecreaseVolume);
|
||||
connect_shortcut(QStringLiteral("Audio Volume Up"), &MainWindow::OnIncreaseVolume);
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# TODO: rewrite this to get a list of every string used in $ANDROID
|
||||
# then search strings.xml
|
||||
#
|
||||
ANDROID=src/android/app/src/main
|
||||
STRINGS=$ANDROID/res/values/strings.xml
|
||||
|
||||
SRC=$(mktemp)
|
||||
|
||||
# We start out by getting the list of source strings...
|
||||
grep -e "string name" $STRINGS | cut -d'"' -f2 > "$SRC"
|
||||
|
||||
# ... then search for each string as R.string. or @string/
|
||||
while IFS= read -r str; do
|
||||
grep -qre "R.string.$str\|@string/$str" "$ANDROID" && continue
|
||||
|
||||
echo "-- Removing unused string $str"
|
||||
sed "/string name=\"$str\"/d" "$STRINGS" > "$STRINGS.new"
|
||||
mv "$STRINGS.new" "$STRINGS"
|
||||
done < "$SRC"
|
||||
|
||||
rm -rf "$TMP_DIR"
|
||||
|
||||
tools/stale-translations.sh
|
||||
Loading…
Reference in New Issue