cmake: Drop image and mixer init and quit check
authorkoda
Sun, 15 Nov 2015 21:10:44 +0100
changeset 11397 f4e19cd88747
parent 11396 bc9650ec9b20
child 11398 6887039a3be9
cmake: Drop image and mixer init and quit check
hedgewars/CMakeLists.txt
hedgewars/SDLh.pas
--- a/hedgewars/CMakeLists.txt	Sun Nov 15 14:14:50 2015 -0500
+++ b/hedgewars/CMakeLists.txt	Sun Nov 15 21:10:44 2015 +0100
@@ -178,18 +178,6 @@
 list(APPEND HW_LINK_LIBS physlayer)
 
 
-#Mix_Init/Mix_Quit from SDL_mixer 1.2.10
-check_library_exists(${SDL2MIXER_LIBRARY} Mix_Init "" HAVE_MIXINIT)
-if(HAVE_MIXINIT)
-    add_definitions(-dSDL_MIXER_NEWER)
-endif(HAVE_MIXINIT)
-
-#IMG_Init/IMG_Quit from SDL_image 1.2.8
-check_library_exists(${SDL2IMAGE_LIBRARY} IMG_Init "" HAVE_IMGINIT)
-if(HAVE_IMGINIT)
-    add_definitions(-dSDL_IMAGE_NEWER)
-endif(HAVE_IMGINIT)
-
 #opengl 2
 IF(GL2)
     add_definitions(-dGL2)
--- a/hedgewars/SDLh.pas	Sun Nov 15 14:14:50 2015 -0500
+++ b/hedgewars/SDLh.pas	Sun Nov 15 21:10:44 2015 +0100
@@ -1168,8 +1168,8 @@
 procedure TTF_CloseFont(font: PTTF_Font); cdecl; external SDL_TTFLibName;
 
 (*  SDL_mixer  *)
-function  Mix_Init(flags: LongInt): LongInt; {$IFDEF SDL_MIXER_NEWER}cdecl; external SDL_MixerLibName{$ELSE}inline{$ENDIF};
-procedure Mix_Quit; {$IFDEF SDL_MIXER_NEWER}cdecl; external SDL_MixerLibName{$ELSE}inline{$ENDIF};
+function  Mix_Init(flags: LongInt): LongInt; cdecl; external SDL_MixerLibName;
+procedure Mix_Quit; cdecl; external SDL_MixerLibName;
 
 function  Mix_OpenAudio(frequency: LongInt; format: Word; channels: LongInt; chunksize: LongInt): LongInt; cdecl; external SDL_MixerLibName;
 procedure Mix_CloseAudio; cdecl; external SDL_MixerLibName;
@@ -1204,8 +1204,8 @@
 procedure Mix_SetPostMix( mix_func: TPostMix; arg: Pointer); cdecl; external SDL_MixerLibName;
 
 (*  SDL_image  *)
-function  IMG_Init(flags: LongInt): LongInt; {$IFDEF SDL_IMAGE_NEWER}cdecl; external SDL_ImageLibName{$ELSE}inline{$ENDIF};
-procedure IMG_Quit; {$IFDEF SDL_IMAGE_NEWER}cdecl; external SDL_ImageLibName{$ELSE}inline{$ENDIF};
+function  IMG_Init(flags: LongInt): LongInt; cdecl; external SDL_ImageLibName;
+procedure IMG_Quit; cdecl; external SDL_ImageLibName;
 
 function  IMG_Load(const _file: PChar): PSDL_Surface; cdecl; external SDL_ImageLibName;
 function  IMG_Load_RW(rwop: PSDL_RWops; freesrc: LongBool): PSDL_Surface; cdecl; external SDL_ImageLibName;
@@ -1257,28 +1257,6 @@
         ((surface^.flags and SDL_RLEACCEL) <> 0)
 end;
 
-{$IFNDEF SDL_MIXER_NEWER}
-function  Mix_Init(flags: LongInt): LongInt; inline;
-begin
-    Mix_Init:= flags;
-end;
-
-procedure Mix_Quit; inline;
-begin
-end;
-{$ENDIF}
-
-{$IFNDEF SDL_IMAGE_NEWER}
-function  IMG_Init(flags: LongInt): LongInt; inline;
-begin
-    IMG_Init:= flags;
-end;
-
-procedure IMG_Quit; inline;
-begin
-end;
-{$ENDIF}
-
 procedure SDLNet_Write16(value: Word; buf: Pointer);
 begin
     PByteArray(buf)^[1]:= value;