IPHONE: Slight cleanup.

This commit is contained in:
Johannes Schickel 2012-02-20 15:12:12 +01:00
parent 76be031ed4
commit 46e622c0fe

View File

@ -57,8 +57,10 @@ static int _mouseX = 0;
static int _mouseY = 0;
static int _mouseCursorEnabled = 0;
// static long lastTick = 0;
// static int frames = 0;
#if 0
static long lastTick = 0;
static int frames = 0;
#endif
#define printOpenGLError() printOglError(__FILE__, __LINE__)
@ -118,12 +120,6 @@ bool iPhone_isHighResDevice() {
void iPhone_updateScreen(int mouseX, int mouseY) {
//printf("Mouse: (%i, %i)\n", mouseX, mouseY);
//_mouseX = _overlayHeight - (float)mouseX / _width * _overlayHeight;
//_mouseY = (float)mouseY / _height * _overlayWidth;
//_mouseX = _overlayHeight - mouseX;
//_mouseY = mouseY;
_mouseX = mouseX;
_mouseY = mouseY;
@ -265,9 +261,7 @@ static void setFilterModeForTexture(GLuint tex, GraphicsModes mode) {
[_keyboardView dealloc];
}
if (_screenTexture)
free(_textureBuffer);
free(_overlayTexBuffer);
}
@ -276,16 +270,18 @@ static void setFilterModeForTexture(GLuint tex, GraphicsModes mode) {
}
- (void)drawRect:(CGRect)frame {
// if (lastTick == 0) {
// lastTick = time(0);
// }
//
// frames++;
// if (time(0) > lastTick) {
// lastTick = time(0);
// printf("FPS: %i\n", frames);
// frames = 0;
// }
#if 0
if (lastTick == 0) {
lastTick = time(0);
}
frames++;
if (time(0) > lastTick) {
lastTick = time(0);
printf("FPS: %i\n", frames);
frames = 0;
}
#endif
}
- (void)setGraphicsMode {