Commit 36420ef4 authored by Jukka Heinonen's avatar Jukka Heinonen Committed by Alexandre Julliard

Added support for int33 show/hide mouse cursor calls.

parent 0e5d9b56
......@@ -40,6 +40,7 @@ static struct
FARPROC16 callback;
WORD callmask;
WORD VMPratio, HMPratio, oldx, oldy;
WORD hide_count;
} mouse_info;
......@@ -58,6 +59,10 @@ static void INT33_ResetMouse( CONTEXT86 *context )
mouse_info.HMPratio = 8;
mouse_info.VMPratio = 16;
/* Hide the mouse cursor */
mouse_info.hide_count = 1;
VGA_ShowMouse( FALSE );
if (context)
{
SET_AX( context, 0xFFFF ); /* driver installed */
......@@ -81,11 +86,20 @@ void WINAPI DOSVM_Int33Handler( CONTEXT86 *context )
break;
case 0x0001:
FIXME("Show mouse cursor\n");
TRACE("Show mouse cursor, old hide count: %d\n",
mouse_info.hide_count);
if (mouse_info.hide_count >= 1)
mouse_info.hide_count--;
if (!mouse_info.hide_count)
VGA_ShowMouse( TRUE );
break;
case 0x0002:
FIXME("Hide mouse cursor\n");
TRACE("Hide mouse cursor, old hide count: %d\n",
mouse_info.hide_count);
if(!mouse_info.hide_count)
VGA_ShowMouse( FALSE );
mouse_info.hide_count++;
break;
case 0x0003:
......
......@@ -653,6 +653,38 @@ int VGA_GetWindowStart()
return vga_fb_window;
}
/**********************************************************************
* VGA_DoShowMouse
*
* Callback for VGA_ShowMouse.
*/
static WINAPI void VGA_DoShowMouse( ULONG_PTR show )
{
INT rv;
do
{
rv = ShowCursor( show );
}
while( show ? (rv < 0) : (rv >= 0) );
}
/**********************************************************************
* VGA_ShowMouse
*
* If argument is TRUE, unconditionally show mouse cursor.
* If argument is FALSE, unconditionally hide mouse cursor.
* This only works in graphics mode.
*/
void VGA_ShowMouse( BOOL show )
{
if (lpddraw)
MZ_RunInThread( VGA_DoShowMouse, (ULONG_PTR)show );
}
/*** TEXT MODE ***/
/* prepare the text mode video memory copy that is used to only
......
......@@ -40,6 +40,7 @@ LPSTR VGA_Lock(unsigned*Pitch,unsigned*Height,unsigned*Width,unsigned*Depth);
void VGA_Unlock(void);
void VGA_SetWindowStart(int start);
int VGA_GetWindowStart();
void VGA_ShowMouse(BOOL show);
/* text mode */
void VGA_InitAlphaMode(unsigned*Xres,unsigned*Yres);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment