Skip to content

Commit b51979e

Browse files
committed
Update device_Komplete Kontrol.py
Changed back to dynamic switch between _thread and _dummy_thread
1 parent 2b4a027 commit b51979e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

device_Komplete Kontrol.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@
2424
# threading module isn't supported by FL's interpreter but _thread does
2525
# However, using _thread makes FL crash eventually at launch on Windows and it isn't compatible with the macOS Python interpreter
2626
# Using _dummy_thread instead
27-
import lib._dummy_thread as _thread
27+
import sys
28+
29+
if sys.platform == "win32":
30+
print("Windows OS detected. Imported _thread module.")
31+
import _thread
32+
33+
if sys.platform == "darwin":
34+
print("macOS detected. Imported _dummy_thread module.")
35+
import lib._dummy_thread as _thread
2836

2937
######################################################################################################################
3038
# User-editable constants for script customization

0 commit comments

Comments
 (0)