-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Battery Notification #314
Comments
android automatic notify drawing over a confirmation window! |
Is the feature available on PC's (laptops) |
this API is probably available everywhere, I think SDL has it: |
WINDOWS AND OSX TESTERS NEEDED PLEASE ! SEE LIST BELOW.
|
Technically, yes. |
"javascript" is html5, I don't know if there's apis to expose the battery On 29 April 2016 at 06:50, Calinou notifications@github.com wrote:
|
@punto- : there is a new javascript Battery Status Web API, but it is still a W3C Proposed Recommendation. It is mainly available on Firefox and Chrome (on Android and PC) https://developer.mozilla.org/en-US/docs/Web/API/Battery_Status_API |
@Calinou OK, so @punto- @SuperUserNameMan I guess we should then simply wait for this one. Keeping it warm. Oh, also I edited my last post. Tests were not driven for *BSD, I updated the status list. |
I'll test this for Windows. |
@StraToN first, there's an error on line 13 of the SCsub file for Windows. It is now Even after this fix I can't compile though. Got a bunch of errors:
|
Tested on X11, it seems to work fine. Like @StraToN reported, I also get -1 for With the cable plugged in and the battery fully charged, I got POWERSTATE_UNKNOWN instead of POWERSTATE_CHARGED. I'm now charging it fully again to see if I can reproduce it. Also the enums in the help are sorted alphabetically instead of by value, it would be nice to fix that. |
@vnen Thanks a lot for your tests ! There was a missing include (I forgot windows.h). This is corrected now, please pull and try again. @akien-mga You just need to compile libsdl and run make in src/tests. There lies a test program for power management testing. |
@StraToN still missing the As a note, it shows the power state as |
@vnen Ah, I see the error now. My eyes were closing yesterday, I didn't see it. I'll correct this ASAP. Concerning get_power_seconds_left(), I invite you to compile SDL as well as demo programs it features, to see if it succeeds. Other than that, no PR until most platorms are tested and compile. We can't merge code thats breaks Godot. Looking at OSX users here in particular 😊 |
ping |
@trollworkout uses OSX, I believe. |
ah I have a mac now, i could test.. On Wed, Jun 15, 2016 at 12:16 PM, George Marques notifications@github.com
|
I got OSX. I'm looking above see how I can test this. |
@StraToN I'd suggest your cleanup your branch (merge some of the commits together, 16 commits is too much for this feature), rebase on top of master HEAD and make a pull request. Right now your work is kind of hidden, and forgotten. |
Was the PR merged in the end? |
I never ended up checking this :D |
@bojidar-bg no, still open: #5871 |
The last comment on #5871 seems to indicate that it was merged. Maybe this one can be closed? |
It still needs to be implemented on various platforms. @StraToN, I leave it up to you to either update this issue with the current implementation status, or maybe close it and open a new one for that, as it might be clearer. |
@akien-mga I'll create a new issue with the current implementation status & what's missing. That's cleaner this way ;) |
Is there any form of battery monitor built in? If not, how much work would it be to add such a feature. I know it's not a major feature, but still nice to be able to say in an application "Your battery is low, please save and quit, or find the nearest power source."
The text was updated successfully, but these errors were encountered: