use roundf for maintas
This commit is contained in:
parent
ff1c8fb0a3
commit
988cad0200
3 changed files with 8 additions and 6 deletions
3
src/dd.c
3
src/dd.c
|
@ -1,4 +1,5 @@
|
|||
#include <windows.h>
|
||||
#include <math.h>
|
||||
#include "ddraw.h"
|
||||
#include "IDirectDraw.h"
|
||||
#include "dd.h"
|
||||
|
@ -805,7 +806,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
|
|||
{
|
||||
g_ddraw->render.viewport.width = g_ddraw->render.width;
|
||||
g_ddraw->render.viewport.height =
|
||||
(int)(((float)g_ddraw->height / g_ddraw->width) * g_ddraw->render.viewport.width);
|
||||
(int)roundf(((float)g_ddraw->height / g_ddraw->width) * g_ddraw->render.viewport.width);
|
||||
|
||||
if (g_ddraw->render.viewport.height > g_ddraw->render.height)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue