Improve devmode mouse handling so testing is faster
This commit is contained in:
parent
a24045e39d
commit
0a4aa43722
2 changed files with 26 additions and 6 deletions
16
mouse.c
16
mouse.c
|
@ -187,7 +187,13 @@ void mouse_lock()
|
|||
{
|
||||
RECT rc;
|
||||
|
||||
if(mouse_active && !ddraw->locked)
|
||||
if (ddraw->devmode)
|
||||
{
|
||||
while(ShowCursor(FALSE) > 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mouse_active && !ddraw->locked)
|
||||
{
|
||||
GetWindowRect(ddraw->hWnd, &rc);
|
||||
|
||||
|
@ -208,6 +214,12 @@ void mouse_unlock()
|
|||
RECT rc;
|
||||
POINT pt;
|
||||
|
||||
if (ddraw->devmode)
|
||||
{
|
||||
while(ShowCursor(TRUE) < 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!mouse_active)
|
||||
{
|
||||
return;
|
||||
|
@ -236,7 +248,7 @@ void mouse_unlock()
|
|||
|
||||
void mouse_init(HWND hWnd)
|
||||
{
|
||||
if(ddraw->mhack)
|
||||
if(ddraw->mhack || ddraw->devmode)
|
||||
{
|
||||
hack_iat(&hacks[0]);
|
||||
mouse_active = TRUE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue