Skip to content

Commit

Permalink
dx9, rare crash with reinit / screen resize
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkc64 committed Sep 27, 2024
1 parent fb520e1 commit 74a1872
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/intf/video/win32/vid_directx9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,8 @@ static int dx9Scale(RECT* pRect, int nWidth, int nHeight)
// Copy BlitFXsMem to pddsBlitFX
static int dx9MemToSurf()
{
if (pVidImage == NULL) return 1; // prevent crash w/ sfiii2 screen resizer

GetClientRect(hVidWnd, &Dest);

if (nVidFullscreen == 0) {
Expand Down Expand Up @@ -2372,6 +2374,8 @@ static void VidSCpyImg16(unsigned char* dst, unsigned int dstPitch, unsigned cha
// Copy BlitFXsMem to pddsBlitFX
static int dx9AltRender() // MemToSurf
{
if (pVidImage == NULL) return 1;

GetClientRect(hVidWnd, &Dest);

if (nVidFullscreen == 0) {
Expand Down

0 comments on commit 74a1872

Please sign in to comment.