Fixed taking screenshots with DirectDraw;

Reenabled minimizing the window - it no longer crashes the emulator.
This commit is contained in:
OBattler
2017-11-18 16:39:01 +01:00
parent 21c60d5a3e
commit d64c481952
4 changed files with 28 additions and 4 deletions

View File

@@ -963,10 +963,10 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nFunsterStil)
/* Set up main window for resizing if configured. */
if (vid_resize)
SetWindowLongPtr(hwnd, GWL_STYLE,
(WS_OVERLAPPEDWINDOW&~WS_MINIMIZEBOX));
(WS_OVERLAPPEDWINDOW));
else
SetWindowLongPtr(hwnd, GWL_STYLE,
(WS_OVERLAPPEDWINDOW&~WS_SIZEBOX&~WS_THICKFRAME&~WS_MAXIMIZEBOX&~WS_MINIMIZEBOX));
(WS_OVERLAPPEDWINDOW&~WS_SIZEBOX&~WS_THICKFRAME&~WS_MAXIMIZEBOX));
/* Move to the last-saved position if needed. */
if (window_remember)

View File

@@ -353,6 +353,7 @@ ddraw_blit(int x, int y, int y1, int y2, int w, int h)
void
ddraw_take_screenshot(wchar_t *fn)
{
#if 0
xs = xsize;
ys = ys2 = ysize;
@@ -369,6 +370,15 @@ ddraw_take_screenshot(wchar_t *fn)
else
ys += overscan_y;
}
#endif
xs = get_actual_size_x();
ys = ys2 = get_actual_size_y();
if (ysize <= 250) {
ys >>= 1;
ys2 >>= 1;
}
CopySurface(lpdds_back2);