aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-13 10:59:55 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-13 10:59:55 +0000
commitc1814154c5dc76654aef640353693553a6a38381 (patch)
tree5806e11f7642af263ef00e4632a7d0ff7abf554b
parent39b1a107c2a8963929a8607cc7da9b284223f1d9 (diff)
downloadusdx-c1814154c5dc76654aef640353693553a6a38381.tar.gz
usdx-c1814154c5dc76654aef640353693553a6a38381.tar.xz
usdx-c1814154c5dc76654aef640353693553a6a38381.zip
Unload background textures when leaving the sing-screen.
Thanks to Hawkear for the patch. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1377 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--src/screens/UScreenSing.pas13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/screens/UScreenSing.pas b/src/screens/UScreenSing.pas
index 911d122e..e20a142d 100644
--- a/src/screens/UScreenSing.pas
+++ b/src/screens/UScreenSing.pas
@@ -79,7 +79,8 @@ type
constructor Create; override;
procedure onShow; override;
procedure onShowFinish; override;
-
+ procedure onHide; override;
+
function ParseInput(PressedKey: cardinal; CharCode: widechar;
PressedDown: boolean): boolean; override;
function Draw: boolean; override;
@@ -612,6 +613,16 @@ begin
CountSkipTimeSet;
end;
+procedure TScreenSing.onHide;
+begin
+ // Unload background texture
+ if (Tex_Background.TexNum > 0) then
+ begin
+ glDeleteTextures(1, PGLuint(@Tex_Background.TexNum));
+ Tex_Background.TexNum := 0;
+ end;
+end;
+
function TScreenSing.Draw: boolean;
var
Min: integer;