muchimi / JoystickGremlinEx

Modified version of Joystick Gremlin to add features I wanted to have but were difficult to do as just a plugin, plus I wanted to run this as 64 bit and on a more current version of Python/QT.
GNU General Public License v3.0
30 stars 6 forks source link

OEMData Registry Hex Edit Question or Feature Request #151

Open Festive4020 opened 13 hours ago

Festive4020 commented 13 hours ago

So, there used to be a registry edit you could to do to make a vjoy device show up as a wheel for games that don't see vjoy in its default state.

The catch is, if you make that edit to a vjoy device, I run into one of the three following scenarios, depending on when I make that edit.

I either A.) Fail to see movement in Vjoy after making this change, even if the axis is successfully mapped on JG's end and it was working before the change

B.) Get the following error if I try to make a new profile in Joystick Gremlin after making the Registry Edit

Uncaught exception:
Traceback (most recent call last):
   File "gremlin\ui\device_tab.py", line 480, in redraw
   File "container_plugins\basic\__init__.py", line 41, in __init__
    super().__init__(profile_data, parent)
   File "gremlin\ui\input_item.py", line 1420, in __init__
   File "gremlin\ui\input_item.py", line 1441, in _create_action_tab
   File "container_plugins\basic\__init__.py", line 55, in _create_action_ui
    widget.redraw()
   File "gremlin\ui\input_item.py", line 829, in redraw
   File "G:\_Utilities\Joystick Configuration Tools\Joystick Gremlin\_internal\action_plugins\map_to_vjoy\__init__.py", line 564, in __init__
    super().__init__(action_data, parent=parent)
   File "gremlin\ui\input_item.py", line 1633, in __init__
   File "G:\_Utilities\Joystick Configuration Tools\Joystick Gremlin\_internal\action_plugins\map_to_vjoy\__init__.py", line 618, in _create_ui
    self._create_input_grid()
   File "G:\_Utilities\Joystick Configuration Tools\Joystick Gremlin\_internal\action_plugins\map_to_vjoy\__init__.py", line 1653, in _create_input_grid
    dev = self.vjoy_map[vjoy_device_id]
          ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
 KeyError: 1

Or

C.) Get the following errors every time I try to load a config on Joystick Gremlin vjoy device that has not had that registry tweak.

Uncaught exception:
Traceback (most recent call last):
   File "gremlin\ui\device_tab.py", line 784, in input_item_selected_cb
   File "gremlin\ui\device_tab.py", line 105, in __init__
   File "gremlin\ui\device_tab.py", line 480, in redraw
   File "container_plugins\basic\__init__.py", line 41, in __init__
    super().__init__(profile_data, parent)
   File "gremlin\ui\input_item.py", line 1420, in __init__
   File "gremlin\ui\input_item.py", line 1441, in _create_action_tab
   File "container_plugins\basic\__init__.py", line 55, in _create_action_ui
    widget.redraw()
   File "gremlin\ui\input_item.py", line 829, in redraw
   File "G:\_Utilities\Joystick Configuration Tools\Joystick Gremlin\_internal\action_plugins\map_to_vjoy\__init__.py", line 564, in __init__
    super().__init__(action_data, parent=parent)
   File "gremlin\ui\input_item.py", line 1633, in __init__
   File "G:\_Utilities\Joystick Configuration Tools\Joystick Gremlin\_internal\action_plugins\map_to_vjoy\__init__.py", line 618, in _create_ui
    self._create_input_grid()
   File "G:\_Utilities\Joystick Configuration Tools\Joystick Gremlin\_internal\action_plugins\map_to_vjoy\__init__.py", line 1653, in _create_input_grid
    dev = self.vjoy_map[vjoy_device_id]
          ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
 KeyError: 1

What's specifically being changed is the OEMData section for vJoy under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM\

and

HKEY_LCURRENT_USER\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM\

And to be fair, I don't actually understand EXACTLY what that does. It just works for a few games that can't see vJoy inputs otherwise.

I also CAN get it to work if I make the registry change AFTER I click the controller icon in joystick gremlin, and then change the registry back after I finish playing.

muchimi commented 12 hours ago

I am not familiar with the wheel hack. Hardware GUIDs, including Vjoy, are read at the program start based on DirectInput data. I would expect an issue if the hardware ID changes after. The exception above is because the ID has changed, which is unexpected.

Do you have an article on the wheel hack for VJOY you can point me to?

Generally speaking, it would be unsupported and definitely cause errors if the behavior is changed from what VJOY normally supports, but I can look into this if the level of effort is not too significant to make it work.

Word of caution: GremlinEx will not change registry keys to avoid security problems as that would result in the code being flagged by UAC so that is not in the cards to do automatically.