git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 858f0034650fc91778f2cf9adaf801ce77d2fe68
parent 8de2d12446d8c9cf2fa8a624f31238802ab71671
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Mon, 29 Dec 2025 12:26:07 +0100

Make it possible to adjust the maximum rumble strength

Diffstat:
MCocoa/GBApp.m1+
MCocoa/GBView.m4++++
MCocoa/Preferences.xib62+++++++++++++++++++++++++++++++++++++++++---------------------
MSDL/configuration.c1+
MSDL/configuration.h3+++
MSDL/font.h1+
MSDL/gui.c24++++++++++++++++++++++++
MSDL/main.c10+++++++++-
MiOS/GBSettingsViewController.m6++++++
MiOS/GBViewController.m4++++
MiOS/main.m1+
11 files changed, 95 insertions(+), 22 deletions(-)

diff --git a/Cocoa/GBApp.m b/Cocoa/GBApp.m @@ -108,6 +108,7 @@ static uint32_t color_to_int(NSColor *color) @"GBColorPalette": @1, @"GBTurboCap": @0, + @"GBRumbleStrength" : @1, // Default themes @"GBThemes": @{ diff --git a/Cocoa/GBView.m b/Cocoa/GBView.m @@ -558,6 +558,10 @@ static const uint8_t workboy_vk_to_key[] = { - (void)setRumble:(double)amp { + double strength = [[NSUserDefaults standardUserDefaults] doubleForKey:@"GBRumbleStrength"]; + if (strength != 1) { + amp = pow(amp, strength) * strength; + } [lastController setRumbleAmplitude:amp]; } diff --git a/Cocoa/Preferences.xib b/Cocoa/Preferences.xib @@ -24,7 +24,7 @@ <windowStyleMask key="styleMask" titled="YES" closable="YES"/> <windowCollectionBehavior key="collectionBehavior" fullScreenAuxiliary="YES"/> <rect key="contentRect" x="196" y="240" width="320" height="224"/> - <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/> + <rect key="screenRect" x="0.0" y="0.0" width="1728" height="1079"/> <view key="contentView" id="EiT-Mj-1SZ"> <rect key="frame" x="0.0" y="0.0" width="320" height="224"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> @@ -796,11 +796,11 @@ <point key="canvasLocation" x="-854" y="626.5"/> </customView> <customView id="8TU-6J-NCg"> - <rect key="frame" x="0.0" y="0.0" width="632" height="409"/> + <rect key="frame" x="0.0" y="0.0" width="632" height="461"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <subviews> <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Utu-t4-cLx"> - <rect key="frame" x="18" y="374" width="130" height="17"/> + <rect key="frame" x="18" y="426" width="130" height="17"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Control settings for" id="YqW-Ds-VIC"> <font key="font" metaFont="system"/> @@ -809,7 +809,7 @@ </textFieldCell> </textField> <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ReM-uo-H0r"> - <rect key="frame" x="233" y="374" width="8" height="17"/> + <rect key="frame" x="233" y="426" width="8" height="17"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title=":" id="VhO-3T-glt"> <font key="font" metaFont="system"/> @@ -818,7 +818,7 @@ </textFieldCell> </textField> <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gWx-7h-0xq"> - <rect key="frame" x="143" y="368" width="91" height="25"/> + <rect key="frame" x="143" y="420" width="91" height="25"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <popUpButtonCell key="cell" type="push" title="Player 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="TO3-R7-9HN" id="pbt-Lr-bU1"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> @@ -837,7 +837,7 @@ </connections> </popUpButton> <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zYm-Ov-RHL"> - <rect key="frame" x="330" y="371" width="280" height="17"/> + <rect key="frame" x="330" y="423" width="280" height="17"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="When playing motion-control games:" id="sgY-3F-qld"> <font key="font" metaFont="system"/> @@ -846,7 +846,7 @@ </textFieldCell> </textField> <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="i7F-1r-NkQ" customClass="GBPreferenceButton"> - <rect key="frame" x="342" y="347" width="272" height="18"/> + <rect key="frame" x="342" y="399" width="272" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> <buttonCell key="cell" type="check" title="Prefer joysticks over motion controls" bezelStyle="regularSquare" imagePosition="left" lineBreakMode="charWrapping" inset="2" id="Szg-5G-j50"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> @@ -857,7 +857,7 @@ </userDefinedRuntimeAttributes> </button> <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wUE-aB-ub1" customClass="GBPreferenceButton"> - <rect key="frame" x="342" y="327" width="268" height="18"/> + <rect key="frame" x="342" y="379" width="268" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> <buttonCell key="cell" type="check" title="Allow mouse controls" bezelStyle="regularSquare" imagePosition="left" lineBreakMode="charWrapping" state="on" inset="2" id="z0R-FZ-LfD"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> @@ -868,7 +868,7 @@ </userDefinedRuntimeAttributes> </button> <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DZu-ts-deW"> - <rect key="frame" x="330" y="194" width="280" height="17"/> + <rect key="frame" x="330" y="246" width="280" height="17"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Enable rumble:" id="QMX-3p-s1Z"> <font key="font" metaFont="system"/> @@ -876,8 +876,17 @@ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> - <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2SB-Bq-Exy"> - <rect key="frame" x="330" y="304" width="280" height="17"/> + <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PHV-4Y-JRt"> + <rect key="frame" x="330" y="193" width="280" height="17"/> + <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> + <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Enable rumble:" id="vCI-aT-WUh"> + <font key="font" metaFont="system"/> + <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> + <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2SB-Bq-Exy"> + <rect key="frame" x="330" y="356" width="280" height="17"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Controller “Hotkey 1†action:" id="GTq-aw-0cU"> <font key="font" metaFont="system"/> @@ -886,7 +895,7 @@ </textFieldCell> </textField> <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qsH-w5-Rja"> - <rect key="frame" x="342" y="272" width="262" height="25"/> + <rect key="frame" x="342" y="324" width="262" height="25"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> <popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="uFa-fO-lTm" id="x4X-Uv-vXf"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> @@ -948,7 +957,7 @@ </connections> </popUpButton> <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8py-43-vaO"> - <rect key="frame" x="330" y="249" width="280" height="17"/> + <rect key="frame" x="330" y="301" width="280" height="17"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Controller “Hotkey 2†action:" id="Gdp-S8-V3q"> <font key="font" metaFont="system"/> @@ -957,7 +966,7 @@ </textFieldCell> </textField> <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ryk-mD-c0y"> - <rect key="frame" x="342" y="217" width="262" height="25"/> + <rect key="frame" x="342" y="269" width="262" height="25"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> <popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="wmV-YY-dHY" id="fS9-cS-iTD"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> @@ -1041,7 +1050,7 @@ </userDefinedRuntimeAttributes> </button> <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ogs-xG-b4b" customClass="GBPreferencePopUpButton"> - <rect key="frame" x="342" y="162" width="262" height="25"/> + <rect key="frame" x="342" y="214" width="262" height="25"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> <popUpButtonCell key="cell" type="push" title="Never" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="jki-7x-bnM" id="o9b-MH-8kd"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> @@ -1081,7 +1090,7 @@ </connections> </button> <box horizontalHuggingPriority="750" fixedFrame="YES" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="Bm0-C4-acq"> - <rect key="frame" x="313" y="20" width="5" height="372"/> + <rect key="frame" x="313" y="20" width="5" height="424"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" heightSizable="YES"/> </box> <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uw7-6d-2xu"> @@ -1096,7 +1105,7 @@ </connections> </button> <scrollView focusRingType="none" fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" verticalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="PBp-dj-EIa"> - <rect key="frame" x="32" y="115" width="262" height="249"/> + <rect key="frame" x="32" y="167" width="262" height="249"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <clipView key="contentView" focusRingType="none" id="AMs-PO-nid"> <rect key="frame" x="1" y="1" width="260" height="247"/> @@ -1152,7 +1161,7 @@ </scroller> </scrollView> <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fcF-wc-KwM"> - <rect key="frame" x="30" y="90" width="231" height="17"/> + <rect key="frame" x="30" y="142" width="231" height="17"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Controller for multiplayer games:" id="AJA-9b-VKI"> <font key="font" metaFont="system"/> @@ -1161,7 +1170,7 @@ </textFieldCell> </textField> <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0Az-0R-oNw"> - <rect key="frame" x="42" y="58" width="255" height="25"/> + <rect key="frame" x="42" y="110" width="255" height="25"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingMiddle" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="hy8-cr-RrE" id="uEC-vN-8Jq"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> @@ -1187,6 +1196,17 @@ <userDefinedRuntimeAttribute type="string" keyPath="preferenceName" value="GBFauxAnalogInputs"/> </userDefinedRuntimeAttributes> </button> + <slider verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HD1-qj-kiI" customClass="GBPreferencesSlider"> + <rect key="frame" x="342" y="159" width="260" height="28"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> + <sliderCell key="cell" continuous="YES" state="on" alignment="left" minValue="32" maxValue="256" doubleValue="256" tickMarkPosition="below" sliderType="linear" id="jp8-GS-5IK"/> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="string" keyPath="preferenceName" value="GBRumbleStrength"/> + <userDefinedRuntimeAttribute type="number" keyPath="denominator"> + <integer key="value" value="256"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </slider> </subviews> <point key="canvasLocation" x="-1010" y="303.5"/> </customView> @@ -1226,7 +1246,7 @@ <window title="Palette Editor" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="g32-xe-7al"> <windowStyleMask key="styleMask" titled="YES" closable="YES"/> <rect key="contentRect" x="283" y="305" width="507" height="341"/> - <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/> + <rect key="screenRect" x="0.0" y="0.0" width="1728" height="1079"/> <view key="contentView" id="uMa-Yg-exg"> <rect key="frame" x="0.0" y="0.0" width="507" height="341"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> @@ -1491,7 +1511,7 @@ <windowStyleMask key="styleMask" titled="YES" closable="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> <rect key="contentRect" x="283" y="305" width="521" height="322"/> - <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/> + <rect key="screenRect" x="0.0" y="0.0" width="1728" height="1079"/> <view key="contentView" id="waz-WG-RYg"> <rect key="frame" x="0.0" y="0.0" width="521" height="322"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> diff --git a/SDL/configuration.c b/SDL/configuration.c @@ -51,4 +51,5 @@ configuration_t configuration = .cgb_revision = GB_MODEL_CGB_E - GB_MODEL_CGB_0, .dmg_palette = 1, // Replacing the old default (0) as of 0.15.2 .agb_revision = GB_MODEL_AGB_A, + .rumble_strength = 8, }; diff --git a/SDL/configuration.h b/SDL/configuration.h @@ -165,6 +165,9 @@ typedef struct { /* v1.0.2 */ int8_t vsync_mode; uint8_t turbo_cap; + + /* v1.0.3 */ + uint8_t rumble_strength; }; } configuration_t; diff --git a/SDL/font.h b/SDL/font.h @@ -15,6 +15,7 @@ extern const uint8_t font_max; #define ELLIPSIS_STRING "\x87" #define MOJIBAKE_STRING "\x88" #define SLIDER_STRING "\x89\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8F\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8B" +#define TICKLESS_SLIDER_STRING "\x89\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8A\x8B" #define SELECTED_SLIDER_STRING "\x8C\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8E" #define COPYRIGHT_STRING "\x90" #define CHECKBOX_OFF_STRING "\x93" diff --git a/SDL/gui.c b/SDL/gui.c @@ -2144,12 +2144,36 @@ static const char *current_hotkey(unsigned index) }) [configuration.hotkey_actions[index - 2]]; } +static void increase_rumble_strength(unsigned index) +{ + if (configuration.rumble_strength < 8) { + configuration.rumble_strength++; + } +} + +static void decrease_rumble_strength(unsigned index) +{ + if (configuration.rumble_strength > 1) { + configuration.rumble_strength--; + } +} + +const char *current_rumble_strength(unsigned index) +{ + static char ret[22]; + strcpy(ret, TICKLESS_SLIDER_STRING); + unsigned pos = ((configuration.rumble_strength - 1) * (strlen(TICKLESS_SLIDER_STRING) - 1) + 3) / 7; + ret[pos] = SELECTED_SLIDER_STRING[pos]; + return ret; +} + static const struct menu_item joypad_menu[] = { {"Joypad:", cycle_joypads, current_joypad_name, cycle_joypads_backwards}, {"Configure layout", detect_joypad_layout}, {"Hotkey 1 Action:", cycle_hotkey, current_hotkey, cycle_hotkey_backwards}, {"Hotkey 2 Action:", cycle_hotkey, current_hotkey, cycle_hotkey_backwards}, {"Rumble Mode:", cycle_rumble_mode, current_rumble_mode, cycle_rumble_mode_backwards}, + {"Rumble Strength:", increase_rumble_strength, current_rumble_strength, decrease_rumble_strength}, {"Analog Stick Behavior:", toggle_use_faux_analog_inputs, current_faux_analog_inputs, toggle_use_faux_analog_inputs}, {"Enable Control:", toggle_allow_background_controllers, current_background_control_mode, toggle_allow_background_controllers}, {"Back", enter_controls_menu}, diff --git a/SDL/main.c b/SDL/main.c @@ -715,6 +715,10 @@ static void vblank(GB_gameboy_t *gb, GB_vblank_type_t type) static void rumble(GB_gameboy_t *gb, double amp) { + if (configuration.rumble_strength != 8) { + double strength = configuration.rumble_strength / 8.0; + amp = pow(amp, strength) * strength; + } SDL_HapticRumblePlay(haptic, amp, 250); } @@ -1441,13 +1445,17 @@ int main(int argc, char **argv) configuration.cgb_revision %= GB_MODEL_CGB_E - GB_MODEL_CGB_0 + 1; configuration.audio_driver[15] = 0; configuration.dmg_palette_name[24] = 0; - // Fix broken defaults, should keys 12-31 should be unmapped by default + // Fix broken defaults, keys 12-31 should be unmapped by default if (configuration.joypad_configuration[31] == 0) { memset(configuration.joypad_configuration + 12 , -1, 32 - 12); } if ((configuration.agb_revision & ~GB_MODEL_GBP_BIT) != GB_MODEL_AGB_A) { configuration.agb_revision = GB_MODEL_AGB_A; } + + if (configuration.rumble_strength > 8 || configuration.rumble_strength == 0) { + configuration.rumble_strength = 8; + } } if (configuration.model >= MODEL_MAX) { diff --git a/iOS/GBSettingsViewController.m b/iOS/GBSettingsViewController.m @@ -370,6 +370,12 @@ static NSString const *typeTurboSlider = @"turboSlider"; ], }, @{ + @"header": @"Rumble Strength", + @"items": @[ + @{@"type": typeSlider, @"pref": @"GBRumbleStrength", @"min": @0.125, @"max": @1, @"minImage": @"waveform.weak", @"maxImage": @"waveform"} + ], + }, + @{ @"items": @[ @{@"type": typeCheck, @"pref": @"GBControllersHideInterface", @"title": @"Hide UI While Using a Controller"}, ], diff --git a/iOS/GBViewController.m b/iOS/GBViewController.m @@ -225,6 +225,10 @@ static uint8_t cameraGetPixel(GB_gameboy_t *gb, uint8_t x, uint8_t y) static void rumbleCallback(GB_gameboy_t *gb, double amp) { GBViewController *self = (__bridge GBViewController *)GB_get_user_data(gb); + double strength = [[NSUserDefaults standardUserDefaults] doubleForKey:@"GBRumbleStrength"]; + if (strength != 1) { + amp = pow(amp, strength) * strength; + } [self rumbleChanged:amp]; } diff --git a/iOS/main.m b/iOS/main.m @@ -33,6 +33,7 @@ int main(int argc, char * argv[]) @"GBRewindSpeed": @1, @"GBDynamicSpeed": @NO, @"GBFauxAnalogInputs": @NO, + @"GBRumbleStrength": @1, @"GBInterfaceTheme": @"SameBoy", @"GBControllersHideInterface": @YES,

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.