diff src/video/uikit/SDL_uikitopengles.m @ 4444:42e1092225f9

Implemented SDL power APIs for iPhoneOS.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 30 Apr 2010 00:39:31 -0400
parents 99210400e8b9
children 8b03a20b320f
line wrap: on
line diff
--- a/src/video/uikit/SDL_uikitopengles.m	Thu Apr 29 22:53:18 2010 -0400
+++ b/src/video/uikit/SDL_uikitopengles.m	Fri Apr 30 00:39:31 2010 -0400
@@ -73,9 +73,14 @@
     return 0;
 }
 
+extern void SDL_UIKit_UpdateBatteryMonitoring(void);
 
 void UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
 {
+    #ifdef SDL_POWER_UIKIT
+    // Check once a frame to see if we should turn off the battery monitor.
+    SDL_UIKit_UpdateBatteryMonitoring();
+    #endif
 
 	SDL_WindowData *data = (SDL_WindowData *)window->driverdata;