diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-02-07 19:52:50 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-02-07 19:52:50 +0000 |
commit | d4d3d8873fea024cd9e1f17b04416bebe627d1f0 (patch) | |
tree | 47053ef22d8de6a59326efe9bb0721ce0d698a30 | |
parent | 51a8b92b1696c8ff27523de753a7c6a743a817de (diff) | |
download | usdx-d4d3d8873fea024cd9e1f17b04416bebe627d1f0.tar.gz usdx-d4d3d8873fea024cd9e1f17b04416bebe627d1f0.tar.xz usdx-d4d3d8873fea024cd9e1f17b04416bebe627d1f0.zip |
SWScale will only be used if FFMpeg is available (this should be the standard case)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@839 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r-- | Game/Code/Classes/UConfig.pas | 19 | ||||
-rw-r--r-- | Game/Code/UltraStar.dpr | 2 | ||||
-rw-r--r-- | Game/Code/switches.inc | 14 |
3 files changed, 24 insertions, 11 deletions
diff --git a/Game/Code/Classes/UConfig.pas b/Game/Code/Classes/UConfig.pas index 51e9348e..a7b0f328 100644 --- a/Game/Code/Classes/UConfig.pas +++ b/Game/Code/Classes/UConfig.pas @@ -67,8 +67,19 @@ uses Sysutils; const - // include config-file + // IMPORTANT: + // If IncludeConstants is defined, the const-sections + // of the config-file will be included too. + // This switch is necessary because it is not possible to + // include the const-sections in the switches.inc. + // switches.inc is always included before the first uses- + // section but at that place no const-section is allowed. + // So we have to include the config-file in switches.inc + // with IncludeConstants undefined and in UConfig.pas with + // IncludeConstants defined (see the note above). {$DEFINE IncludeConstants} + + // include config-file (defines + constants) {$IF Defined(MSWindows)} {$I ../config-win.inc} {$ELSEIF Defined(Linux)} @@ -139,14 +150,14 @@ const (LIBAVUTIL_VERSION_MINOR * VERSION_MINOR) + (LIBAVUTIL_VERSION_RELEASE * VERSION_RELEASE); - {$ENDIF} - {$IFDEF HaveSWScale} LIBSWSCALE_VERSION = (LIBSWSCALE_VERSION_MAJOR * VERSION_MAJOR) + (LIBSWSCALE_VERSION_MINOR * VERSION_MINOR) + (LIBSWSCALE_VERSION_RELEASE * VERSION_RELEASE); {$ENDIF} - + + {$ENDIF} + {$IFDEF HaveProjectM} PROJECTM_VERSION = (PROJECTM_VERSION_MAJOR * VERSION_MAJOR) + (PROJECTM_VERSION_MINOR * VERSION_MINOR) + diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr index 5c26180e..d624e809 100644 --- a/Game/Code/UltraStar.dpr +++ b/Game/Code/UltraStar.dpr @@ -53,10 +53,10 @@ uses opt in 'lib\ffmpeg\opt.pas', avio in 'lib\ffmpeg\avio.pas', mathematics in 'lib\ffmpeg\mathematics.pas', - {$ENDIF} {$IFDEF UseSWScale} swscale in 'lib\ffmpeg\swscale.pas', {$ENDIF} + {$ENDIF} {$IFDEF UseProjectM_0_9} projectM in 'lib\projectM\0.9\projectM.pas', diff --git a/Game/Code/switches.inc b/Game/Code/switches.inc index a50c759b..66a8ad07 100644 --- a/Game/Code/switches.inc +++ b/Game/Code/switches.inc @@ -34,6 +34,7 @@ {$IF Defined(win32)}
+ // include defines but no constants
{$I config-win.inc}
// audio config
@@ -53,9 +54,9 @@ // video config
{$IFDEF HaveFFMpeg}
{$DEFINE UseFFMpegVideo}
- {$ENDIF}
- {$IFDEF HaveSWScale}
- {$DEFINE UseSWScale}
+ {$IFDEF HaveSWScale}
+ {$DEFINE UseSWScale}
+ {$ENDIF}
{$ENDIF}
// misc defines
@@ -72,6 +73,7 @@ {$ENDIF}
{$ENDIF}
{$ELSEIF Defined(Linux)}
+ // include defines but no constants
{$I config-linux.inc}
// audio config
@@ -86,9 +88,9 @@ // video config
{$IFDEF HaveFFMpeg}
{$DEFINE UseFFMpegVideo}
- {$ENDIF}
- {$IFDEF HaveSWScale}
- {$DEFINE UseSWScale}
+ {$IFDEF HaveSWScale}
+ {$DEFINE UseSWScale}
+ {$ENDIF}
{$ENDIF}
// misc defines
|