mirror of
https://github.com/azahar-emu/azahar.git
synced 2025-04-28 13:47:59 +03:00
Internally rename turbo_speed
and similar to turbo_limit
Some checks are pending
citra-build / source (push) Waiting to run
citra-build / linux (appimage) (push) Waiting to run
citra-build / linux (fresh) (push) Waiting to run
citra-build / macos (arm64) (push) Waiting to run
citra-build / macos (x86_64) (push) Waiting to run
citra-build / macos-universal (push) Blocked by required conditions
citra-build / windows (msvc) (push) Waiting to run
citra-build / windows (msys2) (push) Waiting to run
citra-build / android (push) Waiting to run
citra-build / ios (push) Waiting to run
citra-format / clang-format (push) Waiting to run
citra-transifex / transifex (push) Waiting to run
Some checks are pending
citra-build / source (push) Waiting to run
citra-build / linux (appimage) (push) Waiting to run
citra-build / linux (fresh) (push) Waiting to run
citra-build / macos (arm64) (push) Waiting to run
citra-build / macos (x86_64) (push) Waiting to run
citra-build / macos-universal (push) Blocked by required conditions
citra-build / windows (msvc) (push) Waiting to run
citra-build / windows (msys2) (push) Waiting to run
citra-build / android (push) Waiting to run
citra-build / ios (push) Waiting to run
citra-format / clang-format (push) Waiting to run
citra-transifex / transifex (push) Waiting to run
This aligns with the pre-existing `frame_limit` value
This commit is contained in:
parent
dcbf79df14
commit
975ad17442
15 changed files with 37 additions and 37 deletions
|
@ -11,5 +11,5 @@ enum class Hotkey(val button: Int) {
|
|||
PAUSE_OR_RESUME(10004),
|
||||
QUICKSAVE(10005),
|
||||
QUICKLOAD(10006),
|
||||
TURBO_SPEED(10007);
|
||||
TURBO_LIMIT(10007);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ class HotkeyUtility(
|
|||
Hotkey.CYCLE_LAYOUT.button -> screenAdjustmentUtil.cycleLayouts()
|
||||
Hotkey.CLOSE_GAME.button -> EmulationLifecycleUtil.closeGame()
|
||||
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 -> {
|
||||
NativeLibrary.saveState(NativeLibrary.QUICKSAVE_SLOT)
|
||||
Toast.makeText(context,
|
||||
|
|
|
@ -67,7 +67,7 @@ enum class IntSetting(
|
|||
USE_ARTIC_BASE_CONTROLLER("use_artic_base_controller", Settings.SECTION_CONTROLS, 0),
|
||||
ORIENTATION_OPTION("screen_orientation", Settings.SECTION_LAYOUT, 2),
|
||||
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
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ class Settings {
|
|||
const val HOTKEY_PAUSE_OR_RESUME = "hotkey_pause_or_resume_game"
|
||||
const val HOTKEY_QUICKSAVE = "hotkey_quickload"
|
||||
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(
|
||||
KEY_BUTTON_A,
|
||||
|
@ -206,7 +206,7 @@ class Settings {
|
|||
HOTKEY_PAUSE_OR_RESUME,
|
||||
HOTKEY_QUICKSAVE,
|
||||
HOTKEY_QUICKlOAD,
|
||||
HOTKEY_TURBO_SPEED
|
||||
HOTKEY_TURBO_LIMIT
|
||||
)
|
||||
val hotkeyTitles = listOf(
|
||||
R.string.emulation_swap_screens,
|
||||
|
@ -215,7 +215,7 @@ class Settings {
|
|||
R.string.emulation_toggle_pause,
|
||||
R.string.emulation_quicksave,
|
||||
R.string.emulation_quickload,
|
||||
R.string.emulation_toggle_turbo_speed
|
||||
R.string.turbo_limit_hotkey
|
||||
)
|
||||
|
||||
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_QUICKSAVE -> Hotkey.QUICKSAVE.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
|
||||
}
|
||||
|
||||
|
|
|
@ -239,14 +239,14 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|||
)
|
||||
add(
|
||||
SliderSetting(
|
||||
IntSetting.TURBO_SPEED,
|
||||
R.string.turbo_speed,
|
||||
R.string.turbo_speed_description,
|
||||
IntSetting.TURBO_LIMIT,
|
||||
R.string.turbo_limit,
|
||||
R.string.turbo_limit_description,
|
||||
100,
|
||||
400,
|
||||
"%",
|
||||
IntSetting.TURBO_SPEED.key,
|
||||
IntSetting.TURBO_SPEED.defaultValue.toFloat()
|
||||
IntSetting.TURBO_LIMIT.key,
|
||||
IntSetting.TURBO_LIMIT.defaultValue.toFloat()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ object TurboHelper {
|
|||
val toastMessage: String
|
||||
|
||||
if (turboSpeedEnabled) {
|
||||
NativeLibrary.setTemporaryFrameLimit(IntSetting.TURBO_SPEED.int.toDouble())
|
||||
NativeLibrary.setTemporaryFrameLimit(IntSetting.TURBO_LIMIT.int.toDouble())
|
||||
toastMessage = context.getString(R.string.turbo_enabled_toast)
|
||||
} else {
|
||||
NativeLibrary.disableTemporaryFrameLimit()
|
||||
|
|
|
@ -149,7 +149,7 @@ void Config::ReadValues() {
|
|||
ReadSetting("Renderer", Settings::values.use_vsync_new);
|
||||
ReadSetting("Renderer", Settings::values.texture_filter);
|
||||
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
|
||||
if (sdl2_config->GetBoolean("Renderer", "use_frame_limit", true)) {
|
||||
ReadSetting("Renderer", Settings::values.frame_limit);
|
||||
|
|
|
@ -158,7 +158,7 @@ frame_limit =
|
|||
|
||||
# Alternative frame limit which can be triggered by the user
|
||||
# 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.
|
||||
# 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="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="turbo_limit_hotkey">Turbo Speed</string>
|
||||
<string name="turbo_enabled_toast">Turbo Speed Enabled</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_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="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_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_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>
|
||||
|
|
|
@ -2603,7 +2603,7 @@ void GMainWindow::SetTurboEnabled(bool state) {
|
|||
|
||||
void GMainWindow::ReloadTurbo() {
|
||||
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;
|
||||
} else {
|
||||
Settings::is_temporary_frame_limit = false;
|
||||
|
@ -2616,7 +2616,7 @@ void GMainWindow::ReloadTurbo() {
|
|||
void GMainWindow::AdjustSpeedLimit(bool increase) {
|
||||
const int SPEED_LIMIT_STEP = 5;
|
||||
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();
|
||||
|
||||
if (increase) {
|
||||
|
|
|
@ -685,7 +685,7 @@ void QtConfig::ReadRendererValues() {
|
|||
ReadGlobalSetting(Settings::values.use_vsync_new);
|
||||
ReadGlobalSetting(Settings::values.resolution_factor);
|
||||
ReadGlobalSetting(Settings::values.frame_limit);
|
||||
ReadGlobalSetting(Settings::values.turbo_speed);
|
||||
ReadGlobalSetting(Settings::values.turbo_limit);
|
||||
|
||||
ReadGlobalSetting(Settings::values.bg_red);
|
||||
ReadGlobalSetting(Settings::values.bg_green);
|
||||
|
@ -1212,7 +1212,7 @@ void QtConfig::SaveRendererValues() {
|
|||
WriteGlobalSetting(Settings::values.use_vsync_new);
|
||||
WriteGlobalSetting(Settings::values.resolution_factor);
|
||||
WriteGlobalSetting(Settings::values.frame_limit);
|
||||
WriteGlobalSetting(Settings::values.turbo_speed);
|
||||
WriteGlobalSetting(Settings::values.turbo_limit);
|
||||
|
||||
WriteGlobalSetting(Settings::values.bg_red);
|
||||
WriteGlobalSetting(Settings::values.bg_green);
|
||||
|
|
|
@ -28,10 +28,10 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
|||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureGeneral>()) {
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->turbo_speed, &QSlider::valueChanged, this, [&](double value) {
|
||||
Settings::values.turbo_speed.SetValue(SliderToSettings(value));
|
||||
ui->turbo_speed_display_label->setText(
|
||||
QStringLiteral("%1%").arg(Settings::values.turbo_speed.GetValue()));
|
||||
connect(ui->turbo_limit, &QSlider::valueChanged, this, [&](double value) {
|
||||
Settings::values.turbo_limit.SetValue(SliderToSettings(value));
|
||||
ui->turbo_limit_display_label->setText(
|
||||
QStringLiteral("%1%").arg(Settings::values.turbo_limit.GetValue()));
|
||||
});
|
||||
|
||||
// Set a minimum width for the label to prevent the slider from changing size.
|
||||
|
@ -80,9 +80,9 @@ ConfigureGeneral::~ConfigureGeneral() = default;
|
|||
|
||||
void ConfigureGeneral::SetConfiguration() {
|
||||
if (Settings::IsConfiguringGlobal()) {
|
||||
ui->turbo_speed->setValue(SettingsToSlider(Settings::values.turbo_speed.GetValue()));
|
||||
ui->turbo_speed_display_label->setText(
|
||||
QStringLiteral("%1%").arg(Settings::values.turbo_speed.GetValue()));
|
||||
ui->turbo_limit->setValue(SettingsToSlider(Settings::values.turbo_limit.GetValue()));
|
||||
ui->turbo_limit_display_label->setText(
|
||||
QStringLiteral("%1%").arg(Settings::values.turbo_limit.GetValue()));
|
||||
|
||||
ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing.GetValue());
|
||||
ui->toggle_background_pause->setChecked(
|
||||
|
@ -207,7 +207,7 @@ void ConfigureGeneral::SetupPerGameUI() {
|
|||
ConfigurationShared::SetHighlight(ui->widget_screenshot, index == 1);
|
||||
});
|
||||
|
||||
ui->turbo_speed->setVisible(false);
|
||||
ui->turbo_limit->setVisible(false);
|
||||
ui->general_group->setVisible(false);
|
||||
ui->button_reset_defaults->setVisible(false);
|
||||
ui->toggle_gamemode->setVisible(false);
|
||||
|
|
|
@ -148,8 +148,8 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="turbo_speed_layout" native="true">
|
||||
<layout class="QHBoxLayout" name="turbo_speed_layout_inner">
|
||||
<widget class="QWidget" name="turbo_limit_layout" native="true">
|
||||
<layout class="QHBoxLayout" name="turbo_limit_layout_inner">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -163,14 +163,14 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="turbo_speed_label">
|
||||
<widget class="QLabel" name="turbo_limit_label">
|
||||
<property name="text">
|
||||
<string>Turbo Speed:</string>
|
||||
<string>Turbo Speed Limit:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="turbo_speed">
|
||||
<widget class="QSlider" name="turbo_limit">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -211,7 +211,7 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="turbo_speed_display_label">
|
||||
<widget class="QLabel" name="turbo_limit_display_label">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
|
|
|
@ -498,7 +498,7 @@ struct Values {
|
|||
Setting<bool> use_shader_jit{true, "use_shader_jit"};
|
||||
SwitchableSetting<u32, true> resolution_factor{1, 0, 10, "resolution_factor"};
|
||||
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<TextureSampling> texture_sampling{TextureSampling::GameControlled,
|
||||
"texture_sampling"};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue