idzio: Adjust and document [io3] restrict= setting

This commit is contained in:
Tau 2019-11-24 12:59:02 -05:00
parent 65eda2a9f1
commit 9ac573801a
3 changed files with 15 additions and 3 deletions

View File

@ -48,6 +48,18 @@ autoNeutral=1
; Use the left thumbstick for steering instead of both on XInput Controllers. ; Use the left thumbstick for steering instead of both on XInput Controllers.
; Not recommended as it will not give you the precision needed for this game ; Not recommended as it will not give you the precision needed for this game
singleStickSteering=0 singleStickSteering=0
; Adjust scaling for steering wheel input.
;
; This setting scales the steering wheel input so that the maximum positive
; and minimum negative steering inputs reported in the operator menu's input
; test screen do not exceed the value below. The maximum possible value is 128,
; and the value that matches the input range of a real cabinet is 97.
;
; NOTE: This is not the same thing as DirectInput steering wheel movement
; range! Segatools cannot control the maximum angle of your physical steering
; wheel controller, this setting is vendor-specific and can only be adjusted
; in the Control Panel.
restrict=97
[dinput] [dinput]
; Name of the DirectInput wheel to use (or any text that occurs in its name) ; Name of the DirectInput wheel to use (or any text that occurs in its name)

View File

@ -91,7 +91,7 @@ void idz_io_config_load(struct idz_io_config *cfg, const wchar_t *filename)
cfg->vk_test = GetPrivateProfileIntW(L"io3", L"test", '1', filename); cfg->vk_test = GetPrivateProfileIntW(L"io3", L"test", '1', filename);
cfg->vk_service = GetPrivateProfileIntW(L"io3", L"service", '2', filename); cfg->vk_service = GetPrivateProfileIntW(L"io3", L"service", '2', filename);
cfg->vk_coin = GetPrivateProfileIntW(L"io3", L"coin", '3', filename); cfg->vk_coin = GetPrivateProfileIntW(L"io3", L"coin", '3', filename);
cfg->restrict_ = GetPrivateProfileIntW(L"io3", L"restrict", 196, filename); cfg->restrict_ = GetPrivateProfileIntW(L"io3", L"restrict", 97, filename);
GetPrivateProfileStringW( GetPrivateProfileStringW(
L"io3", L"io3",

View File

@ -85,10 +85,10 @@ void idz_io_jvs_read_analogs(struct idz_io_analog_state *out)
/* Apply steering wheel restriction. Real cabs only report about 77% of /* Apply steering wheel restriction. Real cabs only report about 77% of
the IO-3's max ADC output value when the wheel is turned to either of the IO-3's max ADC output value when the wheel is turned to either of
its maximum positions. To match this behavior we set the default value its maximum positions. To match this behavior we set the default value
for the wheel restriction config parameter to 196 (out of 256). This for the wheel restriction config parameter to 97 (out of 128). This
scaling factor is applied using fixed-point arithmetic below. */ scaling factor is applied using fixed-point arithmetic below. */
out->wheel = (tmp.wheel * idz_io_cfg.restrict_) / 256; out->wheel = (tmp.wheel * idz_io_cfg.restrict_) / 128;
out->accel = tmp.accel; out->accel = tmp.accel;
out->brake = tmp.brake; out->brake = tmp.brake;
} }