Skip to content

Commit

Permalink
fix first log
Browse files Browse the repository at this point in the history
  • Loading branch information
antheas committed Apr 14, 2024
1 parent 229b49f commit fd3d147
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hhd/device/rog_ally/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def plugin_run(
):
init = time.perf_counter()
repeated_fail = False
first = True
while not should_exit.is_set():
try:
first = True
gamepad_devs = enumerate_evs(vid=GAMEPAD_VID)
nkey_devs = enumerate_unique(vid=ASUS_VID)
if not gamepad_devs or not nkey_devs:
Expand All @@ -154,6 +154,7 @@ def plugin_run(
controller_loop(conf.copy(), should_exit, updated, emit)
repeated_fail = False
except Exception as e:
first = True
failed_fast = init + LONGER_ERROR_MARGIN > time.perf_counter()
sleep_time = (
LONGER_ERROR_DELAY if repeated_fail and failed_fast else ERROR_DELAY
Expand Down

0 comments on commit fd3d147

Please sign in to comment.