From 8a5aebdd230d32c453292f480be693b08028e619 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Mon, 25 Jan 2010 20:50:39 +0000 Subject: fix software cursor w/ screens = 2 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2096 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/menu/UDisplay.pas | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/menu/UDisplay.pas') diff --git a/src/menu/UDisplay.pas b/src/menu/UDisplay.pas index f8f9c43f..fe29e438 100644 --- a/src/menu/UDisplay.pas +++ b/src/menu/UDisplay.pas @@ -377,11 +377,11 @@ begin // Draw OSD only on first Screen if Debug Mode is enabled if ((Ini.Debug = 1) or (Params.Debug)) and (S = 1) then - DrawDebugInformation; - end; // for + DrawDebugInformation; - if not BlackScreen then - DrawCursor; + if not BlackScreen then + DrawCursor; + end; // for end; { sets SDL_ShowCursor depending on options set in Ini } @@ -481,8 +481,9 @@ procedure TDisplay.DrawCursor; var Alpha: single; Ticks: cardinal; + DrawX: double; begin - if (Ini.Mouse = 2) then + if (Ini.Mouse = 2) and ((Screens = 1) or ((ScreenAct - 1) = (Round(Cursor_X+16) div 800))) then begin // draw software cursor Ticks := SDL_GetTicks; @@ -523,6 +524,9 @@ begin if (Alpha > 0) and (not Cursor_HiddenByScreen) then begin + DrawX := Cursor_X; + if (ScreenAct = 2) then + DrawX := DrawX - RenderW; glColor4f(1, 1, 1, Alpha); glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); @@ -535,16 +539,16 @@ begin glBegin(GL_QUADS); glTexCoord2f(0, 0); - glVertex2f(Cursor_X, Cursor_Y); + glVertex2f(DrawX, Cursor_Y); glTexCoord2f(0, 1); - glVertex2f(Cursor_X, Cursor_Y + 32); + glVertex2f(DrawX, Cursor_Y + 32); glTexCoord2f(1, 1); - glVertex2f(Cursor_X + 32, Cursor_Y + 32); + glVertex2f(DrawX + 32, Cursor_Y + 32); glTexCoord2f(1, 0); - glVertex2f(Cursor_X + 32, Cursor_Y); + glVertex2f(DrawX + 32, Cursor_Y); glEnd; glDisable(GL_BLEND); -- cgit v1.2.3