The online racing simulator
Logitech Wheels rotation range adjustment - The Hack Way
This has been on my try-to-do list for a while and I've finally gotten around to do it. I've always found it pretty annoying that
you have to Alt-Tab to Windows and adjust wheel turn in Control Panel whenever you move from XFG to BF1 or so. Well... not anymore.
I hereby present a nasty hack that reads wheel turn settings from LFS and makes a change in the registry to adjust the wheel turn
of a Logitech Wheel. It is _EXPERIMENTAL_, that's why I don't release it as an Unofficial Addon yet.

To get this thingie working you have to copy it to the LFS directory (where the LFS.exe is) and have it running all the time you
play LFS. There are also few other prerequisities. First make sure the Logitech Profiler is running, this hack won't work without
it. Now follow these instructions:
1) Make a profile for LFS the Profiler(Profile->New, point it to the EXE you'll use to launch LFS).
2) Click "Select a Game > LFS"
3) Go to "Edit > Specific Game Settings"
4) Make sure that the "Use Special Steering Wheel Settings" checkbox is NOT ticked!
5) Go to "Options > Global Profiler Settings"
6) Select "Apply games to profiles automatically"

With this done, you may now launch the hack and LFS (the hack might need admin right on Vista/7). In LFS you can set wheel turn in
"Options > Controls". If you close the options menu and wait for a few seconds, wheel turn in LFS should match the wheel turn in
Logitech Profiler.

To make Logitech Profiler re-read new wheel turn settings it's necessary to minimize LFS and restore it back. This hack can do this
automatically, but there are cases when it might not work. It works best when LFS is in windowed mode, but I've tested the
fullscreen too and it work too, but not as well as in windowed mode. If you notice that the wheel turn is no longer adjusting
automatically, SHIFT+F4ing LFS to a windowed mode and back usually get's it back in business.

Known limitation:
- Setting wheel turn in garage doesn't work, you have to adjust wheel turn in Options > Controls
- This hack adjusts the wheel turn of all Logitech wheel's it finds which you might not want if you have more than one of them.

WARNING: Some direct registry hacking takes place here, so there is a (small) risk of damage. If that happens, uninstalling
Logitech Gaming Software, deleting HKEY_CURRENT_USER/Software/Logitech registry key and installing LGS back should fix it. You
should also report it here...

And why don't I just use the Logitech SDK? Because it crap with capital C and it just refused to cooperate.

EXE and VS2008 source are attached...
Attached files
wtHack_src.zip - 1.7 MB - 396 views
wtHack_bin.zip - 11.8 KB - 348 views
lol..

I just went into this forums because I wanted some help coding something like this - but using the Logitech SDK..

but sadly I am unable to find any hints how to access this Profiler-feature? Maybe you could paste me some useful hints?

regards,
bb
You can get a change wheel properties like this


int idx=0; //Device index
int newRange = 900; //New wheel range

//Declare a struct to store current device properties
ControllerPropertiesData ctrProps;
ZeroMemory(&ctrProps, sizeof(ConttollerPropertiesData));

//Get current properties
g_wheel->GetCurrentProperties(idx, ctrProps);

//Set new wheel range
ctrProps.wheelRange = newRange;

//Tell LGS to use the new wheel range
g_wheel->SetPrefferedProperties(ctrProps);
g_wheel->Update();
g_controllerInput->Update();

I'm writing the code off the top of my head so it might not work just after copy-pasing. You could also check a thread about an attempt tp make G27 LEDs addon in this section, you may find some pointers here. Anyway, best of luck dealing with the Logitech SDK hydra, try not to loose your sanity in the process
Hey...
Very happy to see someone has written a bit of code for this, even if it is hacky
I am planning to try it, now that I have a wheel with lots of turniness (my previous wheel had about 200 degrees ).

Am wondering just how godawful the SDK must be for you to have gone the long way around and implemented it the way you did... Did the API call not work properly/reliably?

(PS: am also planning to play with the LED mod too - do the lights flash beyond the shift point or just stay all lit up?)
You might be more interested in this, which is basically a much more polished version of this proof-of-concept app. I have no idea if it still works with the latest Logitech drivers though.

Quote from Neilser :
Am wondering just how godawful the SDK must be for you to have gone the long way around and implemented it the way you did... Did the API call not work properly/reliably?

The API has apparently been designed to be integrated in the games' code, not to be used in 3rd party addons. The API just wraps some DirectInput calls to a slightly more convenient package, but I believe that the limitations of DirectInput itself would make any attempt to set the range the "proper" way through a 3rd party mod rather difficult.

Quote from Neilser :
(PS: am also planning to play with the LED mod too - do the lights flash beyond the shift point or just stay all lit up?)

I've never seen the LEDs working myself, but I think the flashing is done by the driver automatically when the RPM goes past the redline.
Ah, nice one thanks! Hadn't found the newer thread when I searched
Will have to have a good look at both sets of source code to get a feel for how it's done, as at the mo I am a bit confused as to why the LEDs can be set with DirectInput (by using LFS's own handle for the wheel?) but yet this approach isn't appropriate for the range.
The LEDs mod uses IDirectInputEffect::Escape() function to pass hardware-specific command to the Logitech drivers. The proxy dinput8.dll intercepts LFS' DirectInput calls and passes its own "fake" effect to LFS when LFS attempts to create one, I suppose the source is quite self-explanatory in this case.

Logitech doesn't provide any kind of DirectInput interface for range adjustment, an application that wants to change the range is supposed to notify the Logitech Profiler which then takes care of it. It's somewhat apparent from the Logitech API source...
Bingo, ta!

FGED GREDG RDFGDR GSFDG