@@ -368,11 +368,13 @@ Real OptionPreferences::getScrollFactor(void)
368368 return TheGlobalData->m_keyboardDefaultScrollFactor ;
369369
370370 Int factor = atoi (it->second .str ());
371- if (factor < 0 )
372- factor = 0 ;
373- if (factor > 100 )
374- factor = 100 ;
375-
371+
372+ // TheSuperHackers @tweak xezon 11/07/2025
373+ // No longer caps the upper limit to 100, because the options setting can go beyond that.
374+ // No longer caps the lower limit to 0, because that would mean standstill.
375+ if (factor < 1 )
376+ factor = 1 ;
377+
376378 return factor/100 .0f ;
377379}
378380
@@ -864,13 +866,12 @@ static void setDefaults( void )
864866
865867 // -------------------------------------------------------------------------------------------------
866868// // scroll speed val
867- Int valMin, valMax;
868- // GadgetSliderGetMinMax(sliderScrollSpeed,&valMin, &valMax);
869- // GadgetSliderSetPosition(sliderScrollSpeed, ((valMax - valMin) / 2 + valMin));
870869 Int scrollPos = (Int)(TheGlobalData->m_keyboardDefaultScrollFactor *100 .0f );
871870 GadgetSliderSetPosition ( sliderScrollSpeed, scrollPos );
872871
873872
873+ Int valMin, valMax;
874+
874875 // -------------------------------------------------------------------------------------------------
875876 // slider music volume
876877 GadgetSliderGetMinMax (sliderMusicVolume,&valMin, &valMax);
@@ -1189,7 +1190,7 @@ static void saveOptions( void )
11891190 // -------------------------------------------------------------------------------------------------
11901191 // scroll speed val
11911192 val = GadgetSliderGetPosition (sliderScrollSpeed);
1192- if (val != - 1 )
1193+ if (val > 0 )
11931194 {
11941195 TheWritableGlobalData->m_keyboardScrollFactor = val/100 .0f ;
11951196 DEBUG_LOG ((" Scroll Spped val %d, keyboard scroll factor %f" , val, TheGlobalData->m_keyboardScrollFactor ));
@@ -1838,9 +1839,17 @@ void OptionsMenuInit( WindowLayout *layout, void *userData )
18381839 GadgetCheckBoxSetChecked ( checkDoubleClickAttackMove, TheGlobalData->m_doubleClickAttackMove );
18391840
18401841 // set scroll speed slider
1842+ // TheSuperHackers @tweak xezon 11/07/2025 No longer sets the slider position if the user setting
1843+ // is set beyond the slider limits. This gives the user more freedom to customize the scroll
1844+ // speed. The slider value remains 0.
18411845 Int scrollPos = (Int)(TheGlobalData->m_keyboardScrollFactor *100 .0f );
1842- GadgetSliderSetPosition ( sliderScrollSpeed, scrollPos );
1843- DEBUG_LOG ((" Scroll SPeed %d" , scrollPos));
1846+ Int scrollMin, scrollMax;
1847+ GadgetSliderGetMinMax ( sliderScrollSpeed, &scrollMin, &scrollMax );
1848+ if (scrollPos >= scrollMin && scrollPos <= scrollMax)
1849+ {
1850+ GadgetSliderSetPosition ( sliderScrollSpeed, scrollPos );
1851+ }
1852+ DEBUG_LOG ((" Scroll Speed %d" , scrollPos));
18441853
18451854 // set the send delay check box
18461855 GadgetCheckBoxSetChecked (checkSendDelay, TheGlobalData->m_firewallSendDelay );
0 commit comments