Skip to content
Permalink
Browse files

Corrected battery percentage on iOS (thanks, Felix!).

Fixes Bugzilla #2397.
  • Loading branch information
icculus committed Feb 17, 2014
1 parent fbeb24e commit 245e125e0f86f6f6ef311ed652c7766771a01c2e
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/power/uikit/SDL_syspower.m
@@ -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. */
}

0 comments on commit 245e125

Please sign in to comment.