Browse Source

* (slightly modified) patch by Laaca - avoid disappearing mouse cursor

git-svn-id: trunk@10590 -
Tomas Hajny 17 years ago
parent
commit
a71092edb0
2 changed files with 12 additions and 1 deletions
  1. 5 1
      rtl/go32v2/mouse.pp
  2. 7 0
      rtl/go32v2/video.pp

+ 5 - 1
rtl/go32v2/mouse.pp

@@ -21,6 +21,9 @@ interface
 { tells the mouse unit to draw the mouse cursor itself }
 { tells the mouse unit to draw the mouse cursor itself }
 procedure DoCustomMouse(b : boolean);
 procedure DoCustomMouse(b : boolean);
 
 
+const
+  MouseIsVisible: boolean = false;
+
 
 
 implementation
 implementation
 
 
@@ -55,7 +58,6 @@ const
   CallCounter  : longint = 0;
   CallCounter  : longint = 0;
 {$endif DEBUG}
 {$endif DEBUG}
   drawmousecursor : boolean = false;
   drawmousecursor : boolean = false;
-  mouseisvisible : boolean = false;
   { position where the mouse was drawn the last time }
   { position where the mouse was drawn the last time }
   oldmousex : longint = -1;
   oldmousex : longint = -1;
   oldmousey : longint = -1;
   oldmousey : longint = -1;
@@ -586,6 +588,7 @@ begin
              popl    %ebp
              popl    %ebp
      .LShowMouseExit:
      .LShowMouseExit:
      end;
      end;
+  MouseIsVisible := true;
 end;
 end;
 
 
 
 
@@ -615,6 +618,7 @@ begin
              popl    %ebp
              popl    %ebp
      .LHideMouseExit:
      .LHideMouseExit:
      end;
      end;
+  MouseIsVisible := false;
 end;
 end;
 
 
 
 

+ 7 - 0
rtl/go32v2/video.pp

@@ -194,7 +194,12 @@ begin
 end;
 end;
 
 
 procedure SysUpdateScreen(Force: Boolean);
 procedure SysUpdateScreen(Force: Boolean);
+var
+  Is_Mouse_Vis: boolean;
 begin
 begin
+  Is_Mouse_Vis := MouseIsVisible;     {MouseIsVisible is from Mouse unit}
+  if Is_Mouse_Vis then
+   HideMouse;
   if not force then
   if not force then
    begin
    begin
      asm
      asm
@@ -216,6 +221,8 @@ begin
      dosmemput(videoseg,0,videobuf^,VideoBufSize);
      dosmemput(videoseg,0,videobuf^,VideoBufSize);
      move(videobuf^,oldvideobuf^,VideoBufSize);
      move(videobuf^,oldvideobuf^,VideoBufSize);
    end;
    end;
+  if Is_Mouse_Vis then
+   ShowMouse;
 end;
 end;
 
 
 Procedure DoSetVideoMode(Params: Longint);
 Procedure DoSetVideoMode(Params: Longint);