mirror of
https://github.com/azahar-emu/azahar
synced 2025-11-18 21:10:00 +01:00
Internally rename turbo_speed and similar to turbo_limit
This aligns with the pre-existing `frame_limit` value
This commit is contained in:
parent
dcbf79df14
commit
975ad17442
@ -11,5 +11,5 @@ enum class Hotkey(val button: Int) {
|
|||||||
PAUSE_OR_RESUME(10004),
|
PAUSE_OR_RESUME(10004),
|
||||||
QUICKSAVE(10005),
|
QUICKSAVE(10005),
|
||||||
QUICKLOAD(10006),
|
QUICKLOAD(10006),
|
||||||
TURBO_SPEED(10007);
|
TURBO_LIMIT(10007);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ class HotkeyUtility(
|
|||||||
Hotkey.CYCLE_LAYOUT.button -> screenAdjustmentUtil.cycleLayouts()
|
Hotkey.CYCLE_LAYOUT.button -> screenAdjustmentUtil.cycleLayouts()
|
||||||
Hotkey.CLOSE_GAME.button -> EmulationLifecycleUtil.closeGame()
|
Hotkey.CLOSE_GAME.button -> EmulationLifecycleUtil.closeGame()
|
||||||
Hotkey.PAUSE_OR_RESUME.button -> EmulationLifecycleUtil.pauseOrResume()
|
Hotkey.PAUSE_OR_RESUME.button -> EmulationLifecycleUtil.pauseOrResume()
|
||||||
Hotkey.TURBO_SPEED.button -> TurboHelper.setTurboEnabled(!TurboHelper.isTurboSpeedEnabled())
|
Hotkey.TURBO_LIMIT.button -> TurboHelper.setTurboEnabled(!TurboHelper.isTurboSpeedEnabled())
|
||||||
Hotkey.QUICKSAVE.button -> {
|
Hotkey.QUICKSAVE.button -> {
|
||||||
NativeLibrary.saveState(NativeLibrary.QUICKSAVE_SLOT)
|
NativeLibrary.saveState(NativeLibrary.QUICKSAVE_SLOT)
|
||||||
Toast.makeText(context,
|
Toast.makeText(context,
|
||||||
|
|||||||
@ -67,7 +67,7 @@ enum class IntSetting(
|
|||||||
USE_ARTIC_BASE_CONTROLLER("use_artic_base_controller", Settings.SECTION_CONTROLS, 0),
|
USE_ARTIC_BASE_CONTROLLER("use_artic_base_controller", Settings.SECTION_CONTROLS, 0),
|
||||||
ORIENTATION_OPTION("screen_orientation", Settings.SECTION_LAYOUT, 2),
|
ORIENTATION_OPTION("screen_orientation", Settings.SECTION_LAYOUT, 2),
|
||||||
DISABLE_RIGHT_EYE_RENDER("disable_right_eye_render", Settings.SECTION_RENDERER, 0),
|
DISABLE_RIGHT_EYE_RENDER("disable_right_eye_render", Settings.SECTION_RENDERER, 0),
|
||||||
TURBO_SPEED("turbo_speed", Settings.SECTION_CORE, 200);
|
TURBO_LIMIT("turbo_limit", Settings.SECTION_CORE, 200);
|
||||||
|
|
||||||
override var int: Int = defaultValue
|
override var int: Int = defaultValue
|
||||||
|
|
||||||
|
|||||||
@ -139,7 +139,7 @@ class Settings {
|
|||||||
const val HOTKEY_PAUSE_OR_RESUME = "hotkey_pause_or_resume_game"
|
const val HOTKEY_PAUSE_OR_RESUME = "hotkey_pause_or_resume_game"
|
||||||
const val HOTKEY_QUICKSAVE = "hotkey_quickload"
|
const val HOTKEY_QUICKSAVE = "hotkey_quickload"
|
||||||
const val HOTKEY_QUICKlOAD = "hotkey_quickpause"
|
const val HOTKEY_QUICKlOAD = "hotkey_quickpause"
|
||||||
const val HOTKEY_TURBO_SPEED = "hotkey_turbo_speed"
|
const val HOTKEY_TURBO_LIMIT = "hotkey_turbo_limit"
|
||||||
|
|
||||||
val buttonKeys = listOf(
|
val buttonKeys = listOf(
|
||||||
KEY_BUTTON_A,
|
KEY_BUTTON_A,
|
||||||
@ -206,7 +206,7 @@ class Settings {
|
|||||||
HOTKEY_PAUSE_OR_RESUME,
|
HOTKEY_PAUSE_OR_RESUME,
|
||||||
HOTKEY_QUICKSAVE,
|
HOTKEY_QUICKSAVE,
|
||||||
HOTKEY_QUICKlOAD,
|
HOTKEY_QUICKlOAD,
|
||||||
HOTKEY_TURBO_SPEED
|
HOTKEY_TURBO_LIMIT
|
||||||
)
|
)
|
||||||
val hotkeyTitles = listOf(
|
val hotkeyTitles = listOf(
|
||||||
R.string.emulation_swap_screens,
|
R.string.emulation_swap_screens,
|
||||||
@ -215,7 +215,7 @@ class Settings {
|
|||||||
R.string.emulation_toggle_pause,
|
R.string.emulation_toggle_pause,
|
||||||
R.string.emulation_quicksave,
|
R.string.emulation_quicksave,
|
||||||
R.string.emulation_quickload,
|
R.string.emulation_quickload,
|
||||||
R.string.emulation_toggle_turbo_speed
|
R.string.turbo_limit_hotkey
|
||||||
)
|
)
|
||||||
|
|
||||||
const val PREF_FIRST_APP_LAUNCH = "FirstApplicationLaunch"
|
const val PREF_FIRST_APP_LAUNCH = "FirstApplicationLaunch"
|
||||||
|
|||||||
@ -133,7 +133,7 @@ class InputBindingSetting(
|
|||||||
Settings.HOTKEY_PAUSE_OR_RESUME -> Hotkey.PAUSE_OR_RESUME.button
|
Settings.HOTKEY_PAUSE_OR_RESUME -> Hotkey.PAUSE_OR_RESUME.button
|
||||||
Settings.HOTKEY_QUICKSAVE -> Hotkey.QUICKSAVE.button
|
Settings.HOTKEY_QUICKSAVE -> Hotkey.QUICKSAVE.button
|
||||||
Settings.HOTKEY_QUICKlOAD -> Hotkey.QUICKLOAD.button
|
Settings.HOTKEY_QUICKlOAD -> Hotkey.QUICKLOAD.button
|
||||||
Settings.HOTKEY_TURBO_SPEED -> Hotkey.TURBO_SPEED.button
|
Settings.HOTKEY_TURBO_LIMIT -> Hotkey.TURBO_LIMIT.button
|
||||||
else -> -1
|
else -> -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -239,14 +239,14 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|||||||
)
|
)
|
||||||
add(
|
add(
|
||||||
SliderSetting(
|
SliderSetting(
|
||||||
IntSetting.TURBO_SPEED,
|
IntSetting.TURBO_LIMIT,
|
||||||
R.string.turbo_speed,
|
R.string.turbo_limit,
|
||||||
R.string.turbo_speed_description,
|
R.string.turbo_limit_description,
|
||||||
100,
|
100,
|
||||||
400,
|
400,
|
||||||
"%",
|
"%",
|
||||||
IntSetting.TURBO_SPEED.key,
|
IntSetting.TURBO_LIMIT.key,
|
||||||
IntSetting.TURBO_SPEED.defaultValue.toFloat()
|
IntSetting.TURBO_LIMIT.defaultValue.toFloat()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ object TurboHelper {
|
|||||||
val toastMessage: String
|
val toastMessage: String
|
||||||
|
|
||||||
if (turboSpeedEnabled) {
|
if (turboSpeedEnabled) {
|
||||||
NativeLibrary.setTemporaryFrameLimit(IntSetting.TURBO_SPEED.int.toDouble())
|
NativeLibrary.setTemporaryFrameLimit(IntSetting.TURBO_LIMIT.int.toDouble())
|
||||||
toastMessage = context.getString(R.string.turbo_enabled_toast)
|
toastMessage = context.getString(R.string.turbo_enabled_toast)
|
||||||
} else {
|
} else {
|
||||||
NativeLibrary.disableTemporaryFrameLimit()
|
NativeLibrary.disableTemporaryFrameLimit()
|
||||||
|
|||||||
@ -149,7 +149,7 @@ void Config::ReadValues() {
|
|||||||
ReadSetting("Renderer", Settings::values.use_vsync_new);
|
ReadSetting("Renderer", Settings::values.use_vsync_new);
|
||||||
ReadSetting("Renderer", Settings::values.texture_filter);
|
ReadSetting("Renderer", Settings::values.texture_filter);
|
||||||
ReadSetting("Renderer", Settings::values.texture_sampling);
|
ReadSetting("Renderer", Settings::values.texture_sampling);
|
||||||
ReadSetting("Renderer", Settings::values.turbo_speed);
|
ReadSetting("Renderer", Settings::values.turbo_limit);
|
||||||
// Workaround to map Android setting for enabling the frame limiter to the format Citra expects
|
// Workaround to map Android setting for enabling the frame limiter to the format Citra expects
|
||||||
if (sdl2_config->GetBoolean("Renderer", "use_frame_limit", true)) {
|
if (sdl2_config->GetBoolean("Renderer", "use_frame_limit", true)) {
|
||||||
ReadSetting("Renderer", Settings::values.frame_limit);
|
ReadSetting("Renderer", Settings::values.frame_limit);
|
||||||
|
|||||||
@ -158,7 +158,7 @@ frame_limit =
|
|||||||
|
|
||||||
# Alternative frame limit which can be triggered by the user
|
# Alternative frame limit which can be triggered by the user
|
||||||
# 1 - 9999: Speed limit as a percentage of target game speed. 100 (default)
|
# 1 - 9999: Speed limit as a percentage of target game speed. 100 (default)
|
||||||
turbo_speed =
|
turbo_limit =
|
||||||
|
|
||||||
# The clear color for the renderer. What shows up on the sides of the bottom screen.
|
# The clear color for the renderer. What shows up on the sides of the bottom screen.
|
||||||
# Must be in range of 0.0-1.0. Defaults to 0.0 for all.
|
# Must be in range of 0.0-1.0. Defaults to 0.0 for all.
|
||||||
|
|||||||
@ -146,6 +146,7 @@
|
|||||||
<string name="button_zr" translatable="false">ZR</string>
|
<string name="button_zr" translatable="false">ZR</string>
|
||||||
<string name="input_message_analog_only">This control must be bound to a gamepad analog stick or D-pad axis!</string>
|
<string name="input_message_analog_only">This control must be bound to a gamepad analog stick or D-pad axis!</string>
|
||||||
<string name="input_message_button_only">This control must be bound to a gamepad button!</string>
|
<string name="input_message_button_only">This control must be bound to a gamepad button!</string>
|
||||||
|
<string name="turbo_limit_hotkey">Turbo Speed</string>
|
||||||
<string name="turbo_enabled_toast">Turbo Speed Enabled</string>
|
<string name="turbo_enabled_toast">Turbo Speed Enabled</string>
|
||||||
<string name="turbo_disabled_toast">Turbo Speed Disabled</string>
|
<string name="turbo_disabled_toast">Turbo Speed Disabled</string>
|
||||||
|
|
||||||
@ -247,11 +248,10 @@
|
|||||||
<string name="frame_limit_enable_description">When enabled, emulation speed will be limited to a specified percentage of normal speed. If disabled, emulation speed will be uncapped and the turbo speed hotkey will not work.</string>
|
<string name="frame_limit_enable_description">When enabled, emulation speed will be limited to a specified percentage of normal speed. If disabled, emulation speed will be uncapped and the turbo speed hotkey will not work.</string>
|
||||||
<string name="frame_limit_slider">Limit Speed Percent</string>
|
<string name="frame_limit_slider">Limit Speed Percent</string>
|
||||||
<string name="frame_limit_slider_description">Specifies the percentage to limit emulation speed. With the default of 100% emulation will be limited to normal speed. Values higher or lower will increase or decrease the speed limit.</string>
|
<string name="frame_limit_slider_description">Specifies the percentage to limit emulation speed. With the default of 100% emulation will be limited to normal speed. Values higher or lower will increase or decrease the speed limit.</string>
|
||||||
|
<string name="turbo_limit">Turbo Speed Limit</string>
|
||||||
|
<string name="turbo_limit_description">Emulation speed limit used while the turbo hotkey is active.</string>
|
||||||
<string name="expand_to_cutout_area">Expand to Cutout Area</string>
|
<string name="expand_to_cutout_area">Expand to Cutout Area</string>
|
||||||
<string name="expand_to_cutout_area_description">Expands the display area to include the cutout (or notch) area.</string>
|
<string name="expand_to_cutout_area_description">Expands the display area to include the cutout (or notch) area.</string>
|
||||||
<string name="emulation_toggle_turbo_speed">Turbo Speed</string>
|
|
||||||
<string name="turbo_speed">Turbo Speed</string>
|
|
||||||
<string name="turbo_speed_description">Emulation speed limit used while the turbo hotkey is active.</string>
|
|
||||||
<string name="internal_resolution">Internal Resolution</string>
|
<string name="internal_resolution">Internal Resolution</string>
|
||||||
<string name="internal_resolution_description">Specifies the resolution used to render at. A high resolution will improve visual quality a lot but is also quite heavy on performance and might cause glitches in certain applications.</string>
|
<string name="internal_resolution_description">Specifies the resolution used to render at. A high resolution will improve visual quality a lot but is also quite heavy on performance and might cause glitches in certain applications.</string>
|
||||||
<string name="internal_resolution_setting_auto">Auto (Screen Size)</string>
|
<string name="internal_resolution_setting_auto">Auto (Screen Size)</string>
|
||||||
|
|||||||
@ -2603,7 +2603,7 @@ void GMainWindow::SetTurboEnabled(bool state) {
|
|||||||
|
|
||||||
void GMainWindow::ReloadTurbo() {
|
void GMainWindow::ReloadTurbo() {
|
||||||
if (IsTurboEnabled()) {
|
if (IsTurboEnabled()) {
|
||||||
Settings::temporary_frame_limit = Settings::values.turbo_speed.GetValue();
|
Settings::temporary_frame_limit = Settings::values.turbo_limit.GetValue();
|
||||||
Settings::is_temporary_frame_limit = true;
|
Settings::is_temporary_frame_limit = true;
|
||||||
} else {
|
} else {
|
||||||
Settings::is_temporary_frame_limit = false;
|
Settings::is_temporary_frame_limit = false;
|
||||||
@ -2616,7 +2616,7 @@ void GMainWindow::ReloadTurbo() {
|
|||||||
void GMainWindow::AdjustSpeedLimit(bool increase) {
|
void GMainWindow::AdjustSpeedLimit(bool increase) {
|
||||||
const int SPEED_LIMIT_STEP = 5;
|
const int SPEED_LIMIT_STEP = 5;
|
||||||
auto active_limit =
|
auto active_limit =
|
||||||
IsTurboEnabled() ? &Settings::values.turbo_speed : &Settings::values.frame_limit;
|
IsTurboEnabled() ? &Settings::values.turbo_limit : &Settings::values.frame_limit;
|
||||||
const auto active_limit_value = active_limit->GetValue();
|
const auto active_limit_value = active_limit->GetValue();
|
||||||
|
|
||||||
if (increase) {
|
if (increase) {
|
||||||
|
|||||||
@ -685,7 +685,7 @@ void QtConfig::ReadRendererValues() {
|
|||||||
ReadGlobalSetting(Settings::values.use_vsync_new);
|
ReadGlobalSetting(Settings::values.use_vsync_new);
|
||||||
ReadGlobalSetting(Settings::values.resolution_factor);
|
ReadGlobalSetting(Settings::values.resolution_factor);
|
||||||
ReadGlobalSetting(Settings::values.frame_limit);
|
ReadGlobalSetting(Settings::values.frame_limit);
|
||||||
ReadGlobalSetting(Settings::values.turbo_speed);
|
ReadGlobalSetting(Settings::values.turbo_limit);
|
||||||
|
|
||||||
ReadGlobalSetting(Settings::values.bg_red);
|
ReadGlobalSetting(Settings::values.bg_red);
|
||||||
ReadGlobalSetting(Settings::values.bg_green);
|
ReadGlobalSetting(Settings::values.bg_green);
|
||||||
@ -1212,7 +1212,7 @@ void QtConfig::SaveRendererValues() {
|
|||||||
WriteGlobalSetting(Settings::values.use_vsync_new);
|
WriteGlobalSetting(Settings::values.use_vsync_new);
|
||||||
WriteGlobalSetting(Settings::values.resolution_factor);
|
WriteGlobalSetting(Settings::values.resolution_factor);
|
||||||
WriteGlobalSetting(Settings::values.frame_limit);
|
WriteGlobalSetting(Settings::values.frame_limit);
|
||||||
WriteGlobalSetting(Settings::values.turbo_speed);
|
WriteGlobalSetting(Settings::values.turbo_limit);
|
||||||
|
|
||||||
WriteGlobalSetting(Settings::values.bg_red);
|
WriteGlobalSetting(Settings::values.bg_red);
|
||||||
WriteGlobalSetting(Settings::values.bg_green);
|
WriteGlobalSetting(Settings::values.bg_green);
|
||||||
|
|||||||
@ -28,10 +28,10 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
|||||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureGeneral>()) {
|
: QWidget(parent), ui(std::make_unique<Ui::ConfigureGeneral>()) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
connect(ui->turbo_speed, &QSlider::valueChanged, this, [&](double value) {
|
connect(ui->turbo_limit, &QSlider::valueChanged, this, [&](double value) {
|
||||||
Settings::values.turbo_speed.SetValue(SliderToSettings(value));
|
Settings::values.turbo_limit.SetValue(SliderToSettings(value));
|
||||||
ui->turbo_speed_display_label->setText(
|
ui->turbo_limit_display_label->setText(
|
||||||
QStringLiteral("%1%").arg(Settings::values.turbo_speed.GetValue()));
|
QStringLiteral("%1%").arg(Settings::values.turbo_limit.GetValue()));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set a minimum width for the label to prevent the slider from changing size.
|
// Set a minimum width for the label to prevent the slider from changing size.
|
||||||
@ -80,9 +80,9 @@ ConfigureGeneral::~ConfigureGeneral() = default;
|
|||||||
|
|
||||||
void ConfigureGeneral::SetConfiguration() {
|
void ConfigureGeneral::SetConfiguration() {
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
if (Settings::IsConfiguringGlobal()) {
|
||||||
ui->turbo_speed->setValue(SettingsToSlider(Settings::values.turbo_speed.GetValue()));
|
ui->turbo_limit->setValue(SettingsToSlider(Settings::values.turbo_limit.GetValue()));
|
||||||
ui->turbo_speed_display_label->setText(
|
ui->turbo_limit_display_label->setText(
|
||||||
QStringLiteral("%1%").arg(Settings::values.turbo_speed.GetValue()));
|
QStringLiteral("%1%").arg(Settings::values.turbo_limit.GetValue()));
|
||||||
|
|
||||||
ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing.GetValue());
|
ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing.GetValue());
|
||||||
ui->toggle_background_pause->setChecked(
|
ui->toggle_background_pause->setChecked(
|
||||||
@ -207,7 +207,7 @@ void ConfigureGeneral::SetupPerGameUI() {
|
|||||||
ConfigurationShared::SetHighlight(ui->widget_screenshot, index == 1);
|
ConfigurationShared::SetHighlight(ui->widget_screenshot, index == 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
ui->turbo_speed->setVisible(false);
|
ui->turbo_limit->setVisible(false);
|
||||||
ui->general_group->setVisible(false);
|
ui->general_group->setVisible(false);
|
||||||
ui->button_reset_defaults->setVisible(false);
|
ui->button_reset_defaults->setVisible(false);
|
||||||
ui->toggle_gamemode->setVisible(false);
|
ui->toggle_gamemode->setVisible(false);
|
||||||
|
|||||||
@ -148,8 +148,8 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="turbo_speed_layout" native="true">
|
<widget class="QWidget" name="turbo_limit_layout" native="true">
|
||||||
<layout class="QHBoxLayout" name="turbo_speed_layout_inner">
|
<layout class="QHBoxLayout" name="turbo_limit_layout_inner">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -163,14 +163,14 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="turbo_speed_label">
|
<widget class="QLabel" name="turbo_limit_label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Turbo Speed:</string>
|
<string>Turbo Speed Limit:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSlider" name="turbo_speed">
|
<widget class="QSlider" name="turbo_limit">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -211,7 +211,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="turbo_speed_display_label">
|
<widget class="QLabel" name="turbo_limit_display_label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@ -498,7 +498,7 @@ struct Values {
|
|||||||
Setting<bool> use_shader_jit{true, "use_shader_jit"};
|
Setting<bool> use_shader_jit{true, "use_shader_jit"};
|
||||||
SwitchableSetting<u32, true> resolution_factor{1, 0, 10, "resolution_factor"};
|
SwitchableSetting<u32, true> resolution_factor{1, 0, 10, "resolution_factor"};
|
||||||
SwitchableSetting<double, true> frame_limit{100, 0, 1000, "frame_limit"};
|
SwitchableSetting<double, true> frame_limit{100, 0, 1000, "frame_limit"};
|
||||||
SwitchableSetting<double, true> turbo_speed{200, 0, 1000, "turbo_speed"};
|
SwitchableSetting<double, true> turbo_limit{200, 0, 1000, "turbo_limit"};
|
||||||
SwitchableSetting<TextureFilter> texture_filter{TextureFilter::NoFilter, "texture_filter"};
|
SwitchableSetting<TextureFilter> texture_filter{TextureFilter::NoFilter, "texture_filter"};
|
||||||
SwitchableSetting<TextureSampling> texture_sampling{TextureSampling::GameControlled,
|
SwitchableSetting<TextureSampling> texture_sampling{TextureSampling::GameControlled,
|
||||||
"texture_sampling"};
|
"texture_sampling"};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user