use roundf for maintas
This commit is contained in:
parent
ff1c8fb0a3
commit
988cad0200
3 changed files with 8 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
#include <windows.h>
|
||||
#include <intrin.h>
|
||||
#include <math.h>
|
||||
#include "ddraw.h"
|
||||
#include "debug.h"
|
||||
#include "dd.h"
|
||||
|
@ -381,11 +382,11 @@ void util_toggle_maximize()
|
|||
dst_rc.top = 0;
|
||||
dst_rc.left = 0;
|
||||
dst_rc.right = w;
|
||||
dst_rc.bottom = (LONG)(((float)g_ddraw->height / g_ddraw->width) * w);
|
||||
dst_rc.bottom = (LONG)roundf(((float)g_ddraw->height / g_ddraw->width) * w);
|
||||
|
||||
if (dst_rc.bottom > h)
|
||||
{
|
||||
dst_rc.right = (LONG)(((float)dst_rc.right / dst_rc.bottom) * h);
|
||||
dst_rc.right = (LONG)roundf(((float)dst_rc.right / dst_rc.bottom) * h);
|
||||
dst_rc.bottom = h;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue