hedgewars/uStore.pas
changeset 2724 601158aaa201
parent 2723 eaa6ac1e95ea
child 2735 f2008d0ce3f8
--- a/hedgewars/uStore.pas	Fri Jan 29 00:55:14 2010 +0000
+++ b/hedgewars/uStore.pas	Sat Jan 30 01:46:23 2010 +0000
@@ -1136,11 +1136,18 @@
 {$ENDIF}
 
 	// set view port to whole window
+{$IFDEF IPHONEOS}
+	glViewport(0, 0, cScreenHeight, cScreenWidth);
+{$ELSE}
 	glViewport(0, 0, cScreenWidth, cScreenHeight);
+{$ENDIF}
 
 	glMatrixMode(GL_MODELVIEW);
 	// prepare default translation/scaling
 	glLoadIdentity();
+{$IFDEF IPHONEOS}
+	glRotatef(-90, 0, 0, 1);
+{$ENDIF}
 	glScalef(2.0 / cScreenWidth, -2.0 / cScreenHeight, 1.0);
 	glTranslatef(0, -cScreenHeight / 2, 0);
 
@@ -1150,15 +1157,24 @@
 end;
 
 procedure SetScale(f: GLfloat);
+var
+{$IFDEF IPHONEOS}
+scale: GLfloat = 1.5;
+{$ELSE}
+scale: GLfloat = 2.0;
+{$ENDIF}
 begin
 	// leave immediately if scale factor did not change
 	if f = cScaleFactor then exit;
 
-	if f = 2.0 then glPopMatrix // "return" to default scaling
-	else // other scaling
+	if f = scale then glPopMatrix	// "return" to default scaling
+	else				// other scaling
 	begin
-		glPushMatrix; // save default scaling
+		glPushMatrix;		// save default scaling
 		glLoadIdentity;
+{$IFDEF IPHONEOS}
+		glRotatef(-90, 0, 0, 1);
+{$ENDIF}
 		glScalef(f / cScreenWidth, -f / cScreenHeight, 1.0);
 		glTranslatef(0, -cScreenHeight / 2, 0);
 	end;