SDL_GetPowerInfo() reports wireless mouse's battery info
Osu!Lazer uses SDL_GetPowerInfo() to get battery percentage and show a warning if it's too low - https://github.com/ppy/osu/discussions/21640:

I'm running a battery-less PC, so this warning is incorrect. The only battery-powered device connected to my PC is a wireless mouse I checked if it's battery percentage affects it, and it does! I charged it and the warnings were gone, and when it discharged to 25% they appeared again.

I'm not familiar with SDL so I'm not sure about how this should be fixed, looks like SDL_GetPowerInfo() assumes system has only one power supply, so I guess this should be changed.
That's pretty funny! I'll take a look at this.
I pushed a possible fix for this (we were looking for the string "device" but your screenshot has it capitalized as "Device").
If that doesn't resolve the issue, I have a more aggressive patch that rejects any power devices with identifiers that start with "hidpp_" (which is logitech's HID communication protocol). We might need this if it turns out you're using our D-Bus codepath and the existing checks didn't fix it there.
@bdach In case your weren't subscribed
@icculus, are you merging fixes from SDL2 to main?
I'm waiting to see if this is sufficient before I merge this one.
Maintainer of upstream project where this came up here - I'm not entirely sure why I was tagged in here by @taep96 or what action is expected of me, but if it helps I'll ask to bump SDL on our side so that it can be verified that the fix fixes once we push out our next release. We build the SDL binaries we ship from source anyways, so no need to get any minor release out or anything.
Maintainer of upstream project where this came up here - I'm not entirely sure why I was tagged in here by @taep96 or what action is expected of me, but if it helps I'll ask to bump SDL on our side so that it can be verified that the fix fixes once we push out our next release. We build the SDL binaries we ship from source anyways, so no need to get any minor release out or anything.
That would be super helpful, thank you!
@taep96 Do you have what you need to retest this, now?
I don't think it's released in osu yet and I'm not sure how to test it manually
We haven't pushed out a new user-facing release of our project yet, for whatever's worth, but the change has trickled down to our current master. If @taep96 is able to build and test that, then that should do the trick.
Otherwise probably need a while longer for us to put out a public release. Shouldn't be overly long, we aim for a release every few weeks at worst, but I don't have a concrete timeline to give right now.
I was able to build and run it but will have to wait for my mouse to discharge to test it
If it doesn't fix the issue, don't charge the mouse, I have a second patch ready to go. :)
Not getting it on 2023.524.0 (May 24th release) so I guess it's fixed?
I'm willing to call that Good Enough. :)
Cherry-picked to SDL3, too, in 95f244598bb17455dc7651b0f588965e5c351086.