remaining IFDEFs
authorStepan777 <stepik-777@mail.ru>
Sun, 24 Jun 2012 21:33:45 +0400
changeset 7286 068adc6948e3
parent 7284 24c6fa591866
child 7289 835bb2852579
remaining IFDEFs
hedgewars/hwengine.pas
hedgewars/uVideoRec.pas
hedgewars/uWorld.pas
--- a/hedgewars/hwengine.pas	Sun Jun 24 21:32:33 2012 +0400
+++ b/hedgewars/hwengine.pas	Sun Jun 24 21:33:45 2012 +0400
@@ -360,9 +360,11 @@
     SDLTry(TTF_Init() <> -1, true);
     WriteLnToConsole(msgOK);
 
+{$IFDEF USE_VIDEO_RECORDING}
     if GameType = gmtRecord then
         InitOffscreenOpenGL()
     else
+{$ENDIF}
         begin            
         // show main window
         if cFullScreen then
@@ -415,7 +417,7 @@
     isDeveloperMode:= false;
     TryDo(InitStepsFlags = cifAllInited, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true);
     ParseCommand('rotmask', true);
-    
+
 {$IFDEF USE_VIDEO_RECORDING}
     if GameType = gmtRecord then
         RecorderMainLoop()
@@ -504,7 +506,7 @@
         //uAIAmmoTests does not need to be freed
         //uAIActions does not need to be freed
         uStore.freeModule;
-        uVideoRec.freeModule;
+{$IFDEF USE_VIDEO_RECORDING}uVideoRec.freeModule;{$ENDIF}
     end;
 
     uIO.freeModule;
--- a/hedgewars/uVideoRec.pas	Sun Jun 24 21:32:33 2012 +0400
+++ b/hedgewars/uVideoRec.pas	Sun Jun 24 21:33:45 2012 +0400
@@ -16,10 +16,17 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
+
 {$INCLUDE "options.inc"}
 
 unit uVideoRec;
 
+{$IFNDEF USE_VIDEO_RECORDING}
+interface
+implementation
+end.
+{$ELSE}
+
 {$IFDEF UNIX}
     {$LINKLIB avwrapper}
     {$LINKLIB avutil}
@@ -303,3 +310,5 @@
 end;
 
 end.
+
+{$ENDIF} // USE_VIDEO_RECORDING
--- a/hedgewars/uWorld.pas	Sun Jun 24 21:32:33 2012 +0400
+++ b/hedgewars/uWorld.pas	Sun Jun 24 21:33:45 2012 +0400
@@ -1779,8 +1779,10 @@
 if (not cHasFocus) and (GameState <> gsConfirm) then
     ParseCommand('quit', true);
 
+{$IFDEF USE_VIDEO_RECORDING}
 // do not change volume during prerecording as it will affect sound in video file
 if not flagPrerecording then
+{$ENDIF}
     begin
     if not cHasFocus then DampenAudio()
     else UndampenAudio();