Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Android: Add Pedometer Steps per Hour settings UI (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtiangha authored Sep 1, 2024
1 parent 2f0b2f9 commit 82faf2e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ enum class IntSetting(
RESOLUTION_FACTOR("resolution_factor", Settings.SECTION_RENDERER, 1),
STEREOSCOPIC_3D_MODE("render_3d", Settings.SECTION_RENDERER, 0),
STEREOSCOPIC_3D_DEPTH("factor_3d", Settings.SECTION_RENDERER, 0),
STEPS_PER_HOUR("steps_per_hour", Settings.SECTION_SYSTEM, 0),
CARDBOARD_SCREEN_SIZE("cardboard_screen_size", Settings.SECTION_LAYOUT, 85),
CARDBOARD_X_SHIFT("cardboard_x_shift", Settings.SECTION_LAYOUT, 0),
CARDBOARD_Y_SHIFT("cardboard_y_shift", Settings.SECTION_LAYOUT, 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,18 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
""
)
)
add(
SliderSetting(
IntSetting.STEPS_PER_HOUR,
R.string.steps_per_hour,
R.string.steps_per_hour_description,
0,
65535,
" steps",
IntSetting.STEPS_PER_HOUR.key,
IntSetting.STEPS_PER_HOUR.defaultValue.toFloat()
)
)
add(
RunnableSetting(
R.string.console_id,
Expand Down
2 changes: 1 addition & 1 deletion src/android/app/src/main/jni/default_ini.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ init_ticks_type =
# Defaults to 0.
init_ticks_override =
# Number of steps per hour reported by the pedometer.
# Number of steps per hour reported by the pedometer. Range from 0 to 65,535.
# Defaults to 0.
steps_per_hour =
Expand Down
2 changes: 2 additions & 0 deletions src/android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@
<string name="birthday_day">Day</string>
<string name="country">Country</string>
<string name="play_coins">Play Coins</string>
<string name="steps_per_hour">Pedometer Steps per Hour</string>
<string name="steps_per_hour_description">Number of steps per hour reported by the pedometer. Range from 0 to 65,535.</string>
<string name="console_id">Console ID</string>
<string name="regenerate_console_id">Regenerate Console ID</string>
<string name="regenerate_console_id_description">This will replace your current virtual 3DS with a new one. Your current virtual 3DS will not be recoverable. This might have unexpected effects in games. This might fail if you use an outdated config savegame. Continue?</string>
Expand Down
2 changes: 1 addition & 1 deletion src/citra/default_ini.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ init_ticks_type =
# Defaults to 0.
init_ticks_override =
# Number of steps per hour reported by the pedometer.
# Number of steps per hour reported by the pedometer. Range from 0 to 65,535.
# Defaults to 0.
steps_per_hour =
Expand Down
7 changes: 5 additions & 2 deletions src/citra_qt/configuration/configure_system.ui
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
<item row="12" column="0">
<widget class="QLabel" name="label_play_coins">
<property name="text">
<string>Play Coins:</string>
<string>Play Coins</string>
</property>
</widget>
</item>
Expand All @@ -394,8 +394,11 @@
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_steps_per_hour">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of steps per hour reported by the pedometer. Range from 0 to 65,535.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Pedometer steps per hour:</string>
<string>Pedometer Steps per Hour</string>
</property>
</widget>
</item>
Expand Down

0 comments on commit 82faf2e

Please sign in to comment.