hedgewars/uMisc.pas
changeset 3663 8c28abf427f5
parent 3650 ec90e573f47a
child 3670 4c673e57f0d7
--- a/hedgewars/uMisc.pas	Thu Jul 22 03:08:17 2010 +0200
+++ b/hedgewars/uMisc.pas	Thu Jul 22 12:47:32 2010 +0200
@@ -177,9 +177,7 @@
 procedure AddFileLog(s: shortstring);
 function  RectToStr(Rect: TSDL_Rect): shortstring;
 {$ENDIF}
-{$IFNDEF IPHONEOS}
 procedure MakeScreenshot(filename: shortstring);
-{$ENDIF}
 
 implementation
 uses uConsole, uStore, uIO, uSound, typinfo, sysutils;
@@ -560,15 +558,10 @@
 byte(DecodeBase64[0]):= t - 1
 end;
 
-{$IFNDEF IPHONEOS}
 procedure MakeScreenshot(filename: shortstring);
 var p: Pointer;
     size: Longword;
     f: file;
-{$IFNDEF WIN32}
-    // TGA Header
-    head: array[0..8] of Word = (0, 2, 0, 0, 0, 0, 0, 0, 24);
-{$ELSE}
     // Windows Bitmap Header
     head: array[0..53] of Byte = (
     $42, $4D, // identifier ("BM")
@@ -587,7 +580,6 @@
     0, 0, 0, 0, // number of colors (all)
     0, 0, 0, 0 // number of important colors
     );
-{$ENDIF}
 begin
 playSound(sndShutter);
 
@@ -600,12 +592,7 @@
 p:= GetMem(size);
 
 // update header information and file name
-{$IFNDEF WIN32}
-filename:= ParamStr(1) + '/Screenshots/' + filename + '.tga';
 
-head[6]:= cScreenWidth;
-head[7]:= cScreenHeight;
-{$ELSE}
 filename:= ParamStr(1) + '/Screenshots/' + filename + '.bmp';
 
 head[$02]:= (size + 54) and $ff;
@@ -624,10 +611,9 @@
 head[$23]:= (size shr 8) and $ff;
 head[$24]:= (size shr 16) and $ff;
 head[$25]:= (size shr 24) and $ff;
-{$ENDIF}
 
 //remember that opengles operates on a single surface, so GL_FRONT *should* be implied
-glReadBuffer(GL_FRONT);
+//glReadBuffer(GL_FRONT);
 glReadPixels(0, 0, cScreenWidth, cScreenHeight, GL_BGR, GL_UNSIGNED_BYTE, p);
 
 {$I-}
@@ -643,7 +629,6 @@
 
 FreeMem(p)
 end;
-{$ENDIF}
 
 {$IFDEF DEBUGFILE}
 procedure AddFileLog(s: shortstring);