Skip to content

Commit

Permalink
Corrected battery percentage on iOS (thanks, Felix!).
Browse files Browse the repository at this point in the history
Fixes Bugzilla #2397.
  • Loading branch information
icculus committed Feb 17, 2014
1 parent fbeb24e commit 245e125
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/power/uikit/SDL_syspower.m
Expand Up @@ -87,7 +87,7 @@
}

const float level = [uidev batteryLevel];
*percent = ( (level < 0.0f) ? -1 : (((int) (level + 0.5f)) * 100) );
*percent = ( (level < 0.0f) ? -1 : ((int) ((level * 100) + 0.5f)) );
return SDL_TRUE; /* always the definitive answer on iPhoneOS. */
}

Expand Down

0 comments on commit 245e125

Please sign in to comment.