mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
improve boxing
This commit is contained in:
parent
688ae45001
commit
8978f7320a
@ -59,6 +59,7 @@ BOOL WINAPI fake_GetCursorPos(LPPOINT lpPoint)
|
|||||||
lpPoint->x = (int)ddraw->cursor.x;
|
lpPoint->x = (int)ddraw->cursor.x;
|
||||||
lpPoint->y = (int)ddraw->cursor.y;
|
lpPoint->y = (int)ddraw->cursor.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,11 +74,15 @@ DWORD WINAPI render_soft_main(void)
|
|||||||
dst_width = ddraw->width;
|
dst_width = ddraw->width;
|
||||||
dst_height = ddraw->height;
|
dst_height = ddraw->height;
|
||||||
|
|
||||||
/* test if we can double scale the window */
|
int i;
|
||||||
if (ddraw->width * 2 <= ddraw->render.width && ddraw->height * 2 <= ddraw->render.height)
|
for (i = 20; i-- > 1;)
|
||||||
{
|
{
|
||||||
dst_width *= 2;
|
if (ddraw->width * i <= ddraw->render.width && ddraw->height * i <= ddraw->render.height)
|
||||||
dst_height *= 2;
|
{
|
||||||
|
dst_width *= i;
|
||||||
|
dst_height *= i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dst_top = ddraw->render.height / 2 - dst_height / 2;
|
dst_top = ddraw->render.height / 2 - dst_height / 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user