diff --git a/src/main.cpp b/src/main.cpp index 3533836..9ed97c9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -647,7 +647,7 @@ int main(int argc, char** argv) GetDpiForMonitor(monitor, MDT_EFFECTIVE_DPI, &x, &y); App::I.zoom *= (float)x / 96.f; - RECT clientRect = { 0, 0, (int)App::I.width, (int)App::I.height }; + RECT clientRect = { 0, 0, (int)App::I.width * App::I.zoom, (int)App::I.height * App::I.zoom }; POINT clientPos = { CW_USEDEFAULT, CW_USEDEFAULT }; if (Settings::has("window-rect")) { @@ -662,8 +662,8 @@ int main(int argc, char** argv) AdjustWindowRect(&clientRect, WS_OVERLAPPEDWINDOW, false); } hWnd = CreateWindow(wc.lpszClassName, L"PanoPainter", WS_OVERLAPPEDWINDOW, clientPos.x, clientPos.y, - (float)(clientRect.right - clientRect.left) * App::I.zoom, - (float)(clientRect.bottom - clientRect.top) * App::I.zoom, 0, 0, hInst, 0); + (float)(clientRect.right - clientRect.left), + (float)(clientRect.bottom - clientRect.top), 0, 0, hInst, 0); // Setup GL Rendering Context pfd.nSize = sizeof(pfd); @@ -724,8 +724,8 @@ int main(int argc, char** argv) DestroyWindow(hWnd); hWnd = CreateWindow(wc.lpszClassName, window_title, WS_OVERLAPPEDWINDOW, clientPos.x, clientPos.y, - (float)(clientRect.right - clientRect.left) * App::I.zoom, - (float)(clientRect.bottom - clientRect.top) * App::I.zoom, 0, 0, hInst, 0); + (float)(clientRect.right - clientRect.left), + (float)(clientRect.bottom - clientRect.top), 0, 0, hInst, 0); hDC = GetDC(hWnd); wglChoosePixelFormatARB(hDC, pixel_attribs, nullptr, 1, &pxfmt, &numFormat);