Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Jul 11, 2025

This change fixes and removes the lower and upper Scroll Speed boundaries.

When reading ScrollFactor from Options.ini

  • Min Scroll Speed is now 1 instead of 0.
  • Max Scroll Speed is now uncapped instead of 100. This means that the ScrollFactor above 100 is no longer lost on game restart. And the user can set any scroll speed he likes.

When using Scroll Speed slider in Options Menu

  • The Scroll Speed slider no longer overwrites the ScrollFactor in the Options.ini if it is not set to a recognized range (10 - 145). The Slider Range is defined in OptionsMenu.wnd:SliderScrollSpeed (data).

TODO

  • Replicate in Generals

@xezon xezon requested a review from a team July 11, 2025 17:11
@xezon xezon added Bug Something is not working right, typically is user facing GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Jul 11, 2025
@xezon xezon changed the title [GEN][ZH] Fix and remove lower and upper Scroll Speed boundaries [GEN][ZH] Fix and remove Scroll Speed limits Jul 11, 2025
@xezon
Copy link
Author

xezon commented Jul 13, 2025

Rebased on Main.

Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and does what it says on the tin.

@xezon xezon force-pushed the xezon/fix-scroll-speed-minmax branch from 3f716a6 to d69f72e Compare July 13, 2025 10:04
@xezon
Copy link
Author

xezon commented Jul 13, 2025

Replicated in Generals with conflicts

$ git diff 27f7063006edbafe20db29ae1d5e308c789a0a23..9a76f9eb7ac54d62f9d355adee35eecf5efe047e > changes.patch

$ git apply -p2 --directory=Generals --reject --whitespace=fix changes.patch
Checking patch Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp...
Hunk #1 succeeded at 336 (offset -32 lines).
Hunk #2 succeeded at 820 (offset -46 lines).
Hunk #3 succeeded at 1130 (offset -60 lines).
error: while searching for:
        GadgetCheckBoxSetChecked( checkDoubleClickAttackMove, TheGlobalData->m_doubleClickAttackMove );

        // set scroll speed slider
        Int scrollPos = (Int)(TheGlobalData->m_keyboardScrollFactor*100.0f);
        GadgetSliderSetPosition( sliderScrollSpeed, scrollPos );
        DEBUG_LOG(("Scroll SPeed %d", scrollPos));

        // set the send delay check box
        GadgetCheckBoxSetChecked(checkSendDelay, TheGlobalData->m_firewallSendDelay);

error: patch failed: Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp:1838
Applying patch Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp with 1 reject...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Rejected hunk #4.

@xezon xezon merged commit 45bac4b into TheSuperHackers:main Jul 13, 2025
15 checks passed
@xezon xezon deleted the xezon/fix-scroll-speed-minmax branch July 13, 2025 11:59
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Gen Relates to Generals GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants