From 5493dcdf6ace3edb2c45b727aa5e580714de8709 Mon Sep 17 00:00:00 2001 From: tobigun Date: Sun, 9 Mar 2008 18:52:02 +0000 Subject: Fixed some warnings ("missing result-values", "0 instead of nil", "comparison is always true", "range check errors") git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@947 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UTexture.pas | 4 ++-- Game/Code/Classes/UVideo.pas | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Game/Code/Classes') diff --git a/Game/Code/Classes/UTexture.pas b/Game/Code/Classes/UTexture.pas index 02fb8e52..828a53e8 100644 --- a/Game/Code/Classes/UTexture.pas +++ b/Game/Code/Classes/UTexture.pas @@ -1144,14 +1144,14 @@ end; procedure TTextureUnit.UnloadTexture(Name: string; FromCache: boolean); var T: integer; - TexNum: GLuint; + TexNum: integer; begin T := FindTexture(Name); if not FromCache then begin TexNum := TextureDatabase.Texture[T].Texture.TexNum; if TexNum >= 0 then begin - glDeleteTextures(1, @TexNum); + glDeleteTextures(1, PGLuint(@TexNum)); TextureDatabase.Texture[T].Texture.TexNum := -1; // Log.LogError('Unload texture no '+IntToStr(TexNum)); end; diff --git a/Game/Code/Classes/UVideo.pas b/Game/Code/Classes/UVideo.pas index 7f595928..15399110 100644 --- a/Game/Code/Classes/UVideo.pas +++ b/Game/Code/Classes/UVideo.pas @@ -445,6 +445,8 @@ var sws_dst_w, sws_dst_h: Integer; begin + Result := false; + fVideoOpened := False; fVideoPaused := False; VideoTimeBase := 0; @@ -646,6 +648,8 @@ begin end; end; end; + + Result := true; end; procedure TVideoPlayback_ffmpeg.Close; -- cgit v1.2.3