71 / stadiacontroller

Command line application that emulates an Xbox 360 controller from a wired Stadia controller on Windows.
ISC License
171 stars 22 forks source link

Creating XBOX_360_DEVICE even though Stadia controller isn't connected #2

Closed DanStevens closed 3 years ago

DanStevens commented 3 years ago

I'm getting an intermittent issue where stadiacontroller is creating the XBOX_360_DEVICE even though the Stadia controller isn't connected. There's no output or error messages in the program output. It still detects the controller after connecting it, so it wouldn't be a problem, except the programme has a constant, relatively high CPU usage (around 12-13%).

71 commented 3 years ago

Hey Dan,

This is sort of by design, since in my case I wanted the Xbox 360 controller device to be active at all times to avoid softwares connecting to the Stadia controller first. Not sure how this would happen but I remember having issues with this. A command line flag to change this behavior would be certainly be nice, though.

I saw you forked the repository; do you want to give it a shot or would you prefer I try implementing it?

DanStevens commented 3 years ago

I see. It's not a bad design per se, though the CPU usage is not good. If you are able to fix that that would be good. I took a look at the code myself but it's beyond me. I'm not a C or Go programmer.

71 commented 3 years ago

Oh yeah, I somehow only looked at the memory consumption until now, but the CPU usage was terrible. The latest release should bring this down to ~0% at all times.

DanStevens commented 3 years ago

CPU issue is resolved! Great, thanks! I've configured a task via Task Schedule to run the program in the background on log-in.