jak1: fix high fps menu sliders (#4105)

Menu sliders are very slippery at high FPS and make it touchy and
difficult to select precisely:


https://github.com/user-attachments/assets/3c9b9ae5-0c1f-4a3a-bb18-1bfae5396b6d
This commit is contained in:
Grateful Forest
2025-12-28 16:31:25 +10:30
committed by GitHub
parent dd21b5c942
commit 27fe8d211c
+4 -4
View File
@@ -2300,11 +2300,11 @@
;; slider is selected
(cond
((>= (-> (the-as (pointer float) (-> options (-> obj option-index) value-to-modify)))
(+ (-> options (-> obj option-index) slider-step-size) (-> options (-> obj option-index) param1)))
(+ (* (-> options (-> obj option-index) slider-step-size) DISPLAY_FPS_RATIO) (-> options (-> obj option-index) param1)))
;; we're 1 above minimum, so reduce by 1
(set! (-> (the-as (pointer float) (-> options (-> obj option-index) value-to-modify)))
(- (-> (the-as (pointer float) (-> options (-> obj option-index) value-to-modify)))
(-> options (-> obj option-index) slider-step-size)))
(* (-> options (-> obj option-index) slider-step-size) DISPLAY_FPS_RATIO)))
(set! sound? #t))
((< (-> options (-> obj option-index) param1)
;; not at least 1 above minimum, just set to minimum (why not just use max or something!!)
@@ -2384,10 +2384,10 @@
(case (-> options (-> obj option-index) option-type)
(((game-option-type slider))
(cond
((>= (- (-> options (-> obj option-index) param2) (-> options (-> obj option-index) slider-step-size))
((>= (- (-> options (-> obj option-index) param2) (* (-> options (-> obj option-index) slider-step-size) DISPLAY_FPS_RATIO))
(-> (the-as (pointer float) (-> options (-> obj option-index) value-to-modify))))
(set! (-> (the-as (pointer float) (-> options (-> obj option-index) value-to-modify)))
(+ (-> options (-> obj option-index) slider-step-size)
(+ (* (-> options (-> obj option-index) slider-step-size) DISPLAY_FPS_RATIO)
(-> (the-as (pointer float) (-> options (-> obj option-index) value-to-modify)))))
(set! sound? #t))
((< (-> (the-as (pointer float) (-> options (-> obj option-index) value-to-modify)))