Fix crashing when running on Windows
This commit is contained in:
parent
d2474959ce
commit
2c43fac7ab
2 changed files with 5 additions and 4 deletions
|
@ -48,9 +48,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>
|
||||||
<summary>Click to expand!</summary>
|
<summary>Click to expand!</summary>
|
||||||
|
|
4
dance.py
4
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,6 +82,9 @@ async def get_joycon_list(app):
|
||||||
break
|
break
|
||||||
|
|
||||||
color = '#%02x%02x%02x' % joycon.color_body
|
color = '#%02x%02x%02x' % joycon.color_body
|
||||||
|
|
||||||
|
# Temporary fix for Windows
|
||||||
|
if platform.system() != 'Windows':
|
||||||
joycon.__del__()
|
joycon.__del__()
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue