Fix crashing when running on Windows
This commit is contained in:
parent
d2474959ce
commit
2c43fac7ab
|
@ -47,9 +47,6 @@ It pretends to be the [Just Dance Controller app](https://play.google.com/store/
|
||||||
```
|
```
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Extra step for Windows users
|
|
||||||
Please make [this change](../../issues/3#issuecomment-1101087415). It's only a temporary fix, and will be patched in future versions.
|
|
||||||
|
|
||||||
#### Extra steps for Linux users
|
#### Extra steps for Linux users
|
||||||
<details>
|
<details>
|
||||||
|
|
6
dance.py
6
dance.py
|
@ -1,6 +1,7 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import platform
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
|
@ -81,7 +82,10 @@ async def get_joycon_list(app):
|
||||||
break
|
break
|
||||||
|
|
||||||
color = '#%02x%02x%02x' % joycon.color_body
|
color = '#%02x%02x%02x' % joycon.color_body
|
||||||
joycon.__del__()
|
|
||||||
|
# Temporary fix for Windows
|
||||||
|
if platform.system() != 'Windows':
|
||||||
|
joycon.__del__()
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
'vendor_id': dev['vendor_id'],
|
'vendor_id': dev['vendor_id'],
|
||||||
|
|
Loading…
Reference in New Issue