diff --git a/src/dd.c b/src/dd.c index 0534e04..db4bdf2 100644 --- a/src/dd.c +++ b/src/dd.c @@ -805,12 +805,12 @@ 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)(((double)g_ddraw->height / g_ddraw->width) * g_ddraw->render.viewport.width); + (int)(((float)g_ddraw->height / g_ddraw->width) * g_ddraw->render.viewport.width); if (g_ddraw->render.viewport.height > g_ddraw->render.height) { g_ddraw->render.viewport.width = - (int)(((double)g_ddraw->render.viewport.width / g_ddraw->render.viewport.height) * g_ddraw->render.height); + (int)(((float)g_ddraw->render.viewport.width / g_ddraw->render.viewport.height) * g_ddraw->render.height); g_ddraw->render.viewport.height = g_ddraw->render.height; } diff --git a/src/utils.c b/src/utils.c index 763f271..3e2d686 100644 --- a/src/utils.c +++ b/src/utils.c @@ -381,11 +381,11 @@ void util_toggle_maximize() dst_rc.top = 0; dst_rc.left = 0; dst_rc.right = w; - dst_rc.bottom = (LONG)(((double)g_ddraw->height / g_ddraw->width) * w); + dst_rc.bottom = (LONG)(((float)g_ddraw->height / g_ddraw->width) * w); if (dst_rc.bottom > h) { - dst_rc.right = (LONG)(((double)dst_rc.right / dst_rc.bottom) * h); + dst_rc.right = (LONG)(((float)dst_rc.right / dst_rc.bottom) * h); dst_rc.bottom = h; } diff --git a/src/wndproc.c b/src/wndproc.c index 70c70d6..d6f5543 100644 --- a/src/wndproc.c +++ b/src/wndproc.c @@ -314,8 +314,8 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam real_GetWindowLongA(hWnd, GWL_EXSTYLE)) && SetRect(&clientrc, 0, 0, clientrc.right - clientrc.left, clientrc.bottom - clientrc.top)) { - double scaleH = (double)g_ddraw->height / g_ddraw->width; - double scaleW = (double)g_ddraw->width / g_ddraw->height; + float scaleH = (float)g_ddraw->height / g_ddraw->width; + float scaleW = (float)g_ddraw->width / g_ddraw->height; switch (wParam) {