Skip to content

Commit

Permalink
fix a crash in fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Mar 14, 2018
1 parent 6b17450 commit ac15d42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdl-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Surface::Surface(HWND hwnd) {
GetClientRect(hwnd, &frame);
ClientToScreen(hwnd, &p);

setBitmap(hCaptureBitmap, p.x, p.y, frame.right, frame.bottom);
setBitmap(hCaptureBitmap, p.x, p.y, min(frame.right, nScreenWidth), min(frame.bottom, nScreenHeight));

ReleaseDC(hDesktopWnd, hDesktopDC);
DeleteDC(hCaptureDC);
Expand Down

0 comments on commit ac15d42

Please sign in to comment.