Skip to content

Commit 2c43fac

Browse files
committed
Fix crashing when running on Windows
1 parent d247495 commit 2c43fac

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ It pretends to be the [Just Dance Controller app](https://play.google.com/store/
4747
```
4848
pip3 install -r requirements.txt
4949
```
50-
51-
#### Extra step for Windows users
52-
Please make [this change](../../issues/3#issuecomment-1101087415). It's only a temporary fix, and will be patched in future versions.
5350

5451
#### Extra steps for Linux users
5552
<details>

dance.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import asyncio
22
import json
33
import logging
4+
import platform
45
import re
56
import socket
67
import time
@@ -81,7 +82,10 @@ async def get_joycon_list(app):
8182
break
8283

8384
color = '#%02x%02x%02x' % joycon.color_body
84-
joycon.__del__()
85+
86+
# Temporary fix for Windows
87+
if platform.system() != 'Windows':
88+
joycon.__del__()
8589

8690
info = {
8791
'vendor_id': dev['vendor_id'],

0 commit comments

Comments
 (0)