hedgewars/SDLh.pas
changeset 6990 40e5af28d026
parent 6982 8d41d22a291d
child 7016 8b34f46e10c1
equal deleted inserted replaced
6989:4c35e9cf6057 6990:40e5af28d026
  1068 begin
  1068 begin
  1069     name:= SDL_GetCurrentVideoDriver();
  1069     name:= SDL_GetCurrentVideoDriver();
  1070     if (name <> nil) and (namebuf <> nil) then
  1070     if (name <> nil) and (namebuf <> nil) then
  1071         begin
  1071         begin
  1072         strlcopy(namebuf, name, maxlen);
  1072         strlcopy(namebuf, name, maxlen);
  1073         exit(namebuf)
  1073         SDL_VideoDriverName:= namebuf
  1074         end;
  1074         end;
  1075     exit(name);
  1075     SDL_VideoDriverName:= name;
  1076 end;
  1076 end;
  1077 
  1077 
  1078 function SDL_EnableUNICODE(enable: LongInt): LongInt;
  1078 function SDL_EnableUNICODE(enable: LongInt): LongInt;
  1079 begin
  1079 begin
  1080     SDL_StartTextInput();
  1080     SDL_StartTextInput();
  1081     exit(0);
  1081     SDL_EnableUNICODE:= 0;
  1082 end;
  1082 end;
  1083 
  1083 
  1084 function SDL_EnableKeyRepeat(timedelay, interval: LongInt): LongInt;
  1084 function SDL_EnableKeyRepeat(timedelay, interval: LongInt): LongInt;
  1085 begin
  1085 begin
  1086     timedelay:= timedelay;  // avoid hint
  1086     timedelay:= timedelay;  // avoid hint
  1087     interval:= interval;    // avoid hint
  1087     interval:= interval;    // avoid hint
  1088     exit(0);
  1088     SDL_EnableKeyRepeat:= 0;
  1089 end;
  1089 end;
  1090 {$ELSE}
  1090 {$ELSE}
  1091 const conversionFormat: TSDL_PixelFormat = (
  1091 const conversionFormat: TSDL_PixelFormat = (
  1092         palette: nil; BitsPerPixel: 32; BytesPerPixel: 4;
  1092         palette: nil; BitsPerPixel: 32; BytesPerPixel: 4;
  1093         Rloss: 0; Gloss: 0; Bloss: 0; Aloss: 0;
  1093         Rloss: 0; Gloss: 0; Bloss: 0; Aloss: 0;
  1096         colorkey: 0; alpha: 255);
  1096         colorkey: 0; alpha: 255);
  1097 
  1097 
  1098 function SDL_AllocFormat(format: LongWord): PSDL_PixelFormat;
  1098 function SDL_AllocFormat(format: LongWord): PSDL_PixelFormat;
  1099 begin
  1099 begin
  1100     format:= format;
  1100     format:= format;
  1101     exit(@conversionFormat);
  1101     SDL_AllocFormat:= @conversionFormat;
  1102 end;
  1102 end;
  1103 
  1103 
  1104 procedure SDL_FreeFormat(pixelformat: PSDL_PixelFormat);
  1104 procedure SDL_FreeFormat(pixelformat: PSDL_PixelFormat);
  1105 begin
  1105 begin
  1106     pixelformat:= pixelformat;  // avoid hint
  1106     pixelformat:= pixelformat;  // avoid hint
  1118 end;
  1118 end;
  1119 
  1119 
  1120 {$IFNDEF SDL_MIXER_NEWER}
  1120 {$IFNDEF SDL_MIXER_NEWER}
  1121 function  Mix_Init(flags: LongInt): LongInt;
  1121 function  Mix_Init(flags: LongInt): LongInt;
  1122 begin
  1122 begin
  1123     exit(flags);
  1123     Mix_Init:= flags;
  1124 end;
  1124 end;
  1125 
  1125 
  1126 procedure Mix_Quit;
  1126 procedure Mix_Quit;
  1127 begin
  1127 begin
  1128 end;
  1128 end;
  1129 {$ENDIF}
  1129 {$ENDIF}
  1130 
  1130 
  1131 {$IFNDEF SDL_IMAGE_NEWER}
  1131 {$IFNDEF SDL_IMAGE_NEWER}
  1132 function  IMG_Init(flags: LongInt): LongInt;
  1132 function  IMG_Init(flags: LongInt): LongInt;
  1133 begin
  1133 begin
  1134     exit(flags);
  1134     IMG_Init:= flags;
  1135 end;
  1135 end;
  1136 
  1136 
  1137 procedure IMG_Quit;
  1137 procedure IMG_Quit;
  1138 begin
  1138 begin
  1139 end;
  1139 end;