From 69ee62663903dcbaae4fb040f0edd9b9678a6ef2 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 11 Dec 2015 01:22:00 +0000 Subject: [PATCH] winport - fix crash on startup with clean ini file --- desmume/src/windows/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 64aca5990..d819e825d 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -4957,7 +4957,9 @@ DOKEYDOWN: if(!romloaded) { - Display(); + //ugh, dont do this when creating the window. in case we're using ddraw display method, ddraw wont be setup yet + if(ddraw.handle) + Display(); } else { @@ -7254,7 +7256,6 @@ bool DDRAW::createSurfaces(HWND hwnd) if (!handle) return true; if (clip) { clip->Release(); clip = NULL; } - if (surface.back) { surface.back->Release(); surface.back = NULL; } if (surface.primary) { surface.primary->Release(); surface.primary = NULL; }