Skip to content

Commit

Permalink
Add short sleep to give devices time to be registered
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteMagic committed May 31, 2019
1 parent f1b8192 commit af28deb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions joystick_gremlin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1257,9 +1257,6 @@ def exception_hook(exception_type, value, trace):
hg = gremlin.hid_guardian.HidGuardian()
hg.add_process(os.getpid())

# Initialize DirectInputListener
# DILL.init()

# Create user interface
app_id = u"joystick.gremlin"
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(app_id)
Expand All @@ -1268,6 +1265,7 @@ def exception_hook(exception_type, value, trace):
app.setApplicationDisplayName("Joystick Gremlin")

# Ensure joystick devices are correctly setup
time.sleep(1)
gremlin.joystick_handling.joystick_devices_initialization()

# Check if vJoy is properly setup and if not display an error
Expand Down

0 comments on commit af28deb

Please sign in to comment.