From d1af5f06fa5b59f7d96c8e8dad85f7045cad438e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 20 Jan 2017 20:49:08 +0100 Subject: [PATCH] ddraw-FlipToGDISurface: Update patchset and missing NULL pointer check. --- ...ddraw-Implement-ddraw7_FlipToGDISurface.patch | 16 +++++++++------- patches/patchinstall.sh | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/patches/ddraw-FlipToGDISurface/0001-ddraw-Implement-ddraw7_FlipToGDISurface.patch b/patches/ddraw-FlipToGDISurface/0001-ddraw-Implement-ddraw7_FlipToGDISurface.patch index 95b1a8f6..8392ab0c 100644 --- a/patches/ddraw-FlipToGDISurface/0001-ddraw-Implement-ddraw7_FlipToGDISurface.patch +++ b/patches/ddraw-FlipToGDISurface/0001-ddraw-Implement-ddraw7_FlipToGDISurface.patch @@ -1,19 +1,19 @@ -From 8bd90811a6f9431ffc1a966d76c80fae0ba23171 Mon Sep 17 00:00:00 2001 +From 269fa9451452446fb3c79cece46b61617f6eb480 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 8 Jan 2017 22:32:32 +0100 -Subject: ddraw: Implement ddraw7_FlipToGDISurface. +Subject: ddraw: Implement ddraw7_FlipToGDISurface. (v2) --- - dlls/ddraw/ddraw.c | 7 ++++++- + dlls/ddraw/ddraw.c | 9 ++++++++- dlls/ddraw/ddraw_private.h | 1 + dlls/ddraw/surface.c | 5 +++-- - 3 files changed, 10 insertions(+), 3 deletions(-) + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c -index 6afa6dddcb4..b883770c537 100644 +index 3b4c628666b..7a313e384ac 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c -@@ -2058,7 +2058,12 @@ static HRESULT WINAPI d3d1_Initialize(IDirect3D *iface, REFIID riid) +@@ -2061,7 +2061,14 @@ static HRESULT WINAPI d3d1_Initialize(IDirect3D *iface, REFIID riid) *****************************************************************************/ static HRESULT WINAPI ddraw7_FlipToGDISurface(IDirectDraw7 *iface) { @@ -23,7 +23,9 @@ index 6afa6dddcb4..b883770c537 100644 + TRACE("iface %p.\n", iface); + + ddraw->flags |= DDRAW_GDI_FLIP; -+ ddraw_surface_update_frontbuffer(ddraw->primary, NULL, FALSE); ++ ++ if (ddraw->primary) ++ ddraw_surface_update_frontbuffer(ddraw->primary, NULL, FALSE); return DD_OK; } diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index e710cb38..2a8e6a71 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -3868,7 +3868,7 @@ fi if test "$enable_ddraw_FlipToGDISurface" -eq 1; then patch_apply ddraw-FlipToGDISurface/0001-ddraw-Implement-ddraw7_FlipToGDISurface.patch ( - printf '%s\n' '+ { "Henri Verbeet", "ddraw: Implement ddraw7_FlipToGDISurface.", 1 },'; + printf '%s\n' '+ { "Henri Verbeet", "ddraw: Implement ddraw7_FlipToGDISurface.", 2 },'; ) >> "$patchlist" fi