Added support for int33 show/hide mouse cursor calls.
This commit is contained in:
parent
0e5d9b56cb
commit
36420ef44a
|
@ -40,6 +40,7 @@ static struct
|
||||||
FARPROC16 callback;
|
FARPROC16 callback;
|
||||||
WORD callmask;
|
WORD callmask;
|
||||||
WORD VMPratio, HMPratio, oldx, oldy;
|
WORD VMPratio, HMPratio, oldx, oldy;
|
||||||
|
WORD hide_count;
|
||||||
} mouse_info;
|
} mouse_info;
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,6 +59,10 @@ static void INT33_ResetMouse( CONTEXT86 *context )
|
||||||
mouse_info.HMPratio = 8;
|
mouse_info.HMPratio = 8;
|
||||||
mouse_info.VMPratio = 16;
|
mouse_info.VMPratio = 16;
|
||||||
|
|
||||||
|
/* Hide the mouse cursor */
|
||||||
|
mouse_info.hide_count = 1;
|
||||||
|
VGA_ShowMouse( FALSE );
|
||||||
|
|
||||||
if (context)
|
if (context)
|
||||||
{
|
{
|
||||||
SET_AX( context, 0xFFFF ); /* driver installed */
|
SET_AX( context, 0xFFFF ); /* driver installed */
|
||||||
|
@ -81,11 +86,20 @@ void WINAPI DOSVM_Int33Handler( CONTEXT86 *context )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0001:
|
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;
|
break;
|
||||||
|
|
||||||
case 0x0002:
|
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;
|
break;
|
||||||
|
|
||||||
case 0x0003:
|
case 0x0003:
|
||||||
|
|
|
@ -653,6 +653,38 @@ int VGA_GetWindowStart()
|
||||||
return vga_fb_window;
|
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 ***/
|
/*** TEXT MODE ***/
|
||||||
|
|
||||||
/* prepare the text mode video memory copy that is used to only
|
/* 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_Unlock(void);
|
||||||
void VGA_SetWindowStart(int start);
|
void VGA_SetWindowStart(int start);
|
||||||
int VGA_GetWindowStart();
|
int VGA_GetWindowStart();
|
||||||
|
void VGA_ShowMouse(BOOL show);
|
||||||
|
|
||||||
/* text mode */
|
/* text mode */
|
||||||
void VGA_InitAlphaMode(unsigned*Xres,unsigned*Yres);
|
void VGA_InitAlphaMode(unsigned*Xres,unsigned*Yres);
|
||||||
|
|
Loading…
Reference in New Issue