Skip to content
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

Add power battery% access #5869

Closed
wants to merge 1 commit into from
Closed

Conversation

StraToN
Copy link
Member

@StraToN StraToN commented Jul 23, 2016

Only tested X11 and Windows by @vnen. Sorry I don't have a mac
JOB IS NOT FINISHED FOR ALL PLATFORMS! NEED TESTERS for iOS, OSX, WinRT and Android (may not compile for these).
Thanks


int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent)
{
/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure this should be commented :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this directly comes from SDL @bojidar-bg
I'll remove it if you think it has to be.

Copy link
Contributor

@bojidar-bg bojidar-bg Jul 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's mostly useless to have a function that has a only a return 0 inside it...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, it would be nice to make it very clear in all files which code chunks come from SDL (and maybe even the version) so that we can compare with upstream and do changes as needed in the future.
If complete files come from SDL and were just "ported" to Godot's standard library, you could put this in a comment just below the Godot license header.

Copy link
Member Author

@StraToN StraToN Jul 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function was imported from SDL but I am unable to test it so I commented it out. It's here to be filled in the future.
Also, I'm unable to get this branch updated with current master in order to shoot down conflicts, so I'll close this PR and remake it completely from scratch.

@akien-mga Oops I forgot to add these comments. It'll be done in the next commit, as there should be more commits for platforms I couldn't test. See #5871

@@ -0,0 +1,10 @@
Godot Engine is a project initiated by Juan "reduz" Linietsky and Ariel "punto" Manzur.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should probably be added in another PR, with a first attempt at writing the mentioned exhaustive list of contributors.

@StraToN StraToN closed this Jul 23, 2016
@StraToN StraToN deleted the power-battery branch July 23, 2016 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants