Commit 3f5a83ad authored by Fabian Greffrath's avatar Fabian Greffrath

Remove all patches backported from upstream, apply two post-release patches

parent 57bf6b2d
From f96076090f1cdfd7e64088cf2c6832f85fa1f487 Mon Sep 17 00:00:00 2001
From: Fabian Greffrath <fabian@greffrath.com>
Date: Thu, 28 Feb 2019 10:32:21 +0100
Subject: [PATCH 1/2] only draw revealed secret sector boundaries in gold if
"Show Revealed Secrets" is enabled
Fixes #389, thanks @Zodomaniac
---
src/doom/am_map.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/doom/am_map.c b/src/doom/am_map.c
index f195bf25..21cc310b 100644
--- a/src/doom/am_map.c
+++ b/src/doom/am_map.c
@@ -1357,7 +1357,7 @@ void AM_drawWalls(void)
cheating && (lines[i].frontsector->special == 9))
AM_drawMline(&l, SECRETWALLCOLORS);
#if defined CRISPY_HIGHLIGHT_REVEALED_SECRETS
- // [crispy] draw revealed secrets in gold
+ // [crispy] draw revealed secret sector boundaries in gold
else
if (crispy->extautomap &&
crispy->secretmessage && (lines[i].frontsector->oldspecial == 9))
@@ -1385,7 +1385,7 @@ void AM_drawWalls(void)
}
#if defined CRISPY_HIGHLIGHT_REVEALED_SECRETS
// [crispy] draw revealed secret sector boundaries in gold
- else if (crispy->extautomap &&
+ else if (crispy->extautomap && crispy->secretmessage &&
(lines[i].backsector->oldspecial == 9 ||
lines[i].frontsector->oldspecial == 9))
{
--
2.20.1
From 07e9f3b987cc45c6e5ddd8197309f977d914f6a6 Mon Sep 17 00:00:00 2001
From: Fabian Greffrath <fabian@greffrath.com>
Date: Thu, 20 Dec 2018 11:05:41 +0100
Subject: [PATCH 1/7] video: create new texture before destroying old one
This fixes a racing condition which would leave us with no
intermediate texture available until the new one is created.
---
src/i_video.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -612,6 +612,8 @@ static void CreateUpscaledTexture(boolea
int h_upscale, w_upscale;
static int h_upscale_old, w_upscale_old;
+ SDL_Texture *new_texture, *old_texture;
+
// Get the size of the renderer output. The units this gives us will be
// real world pixels, which are not necessarily equivalent to the screen's
// window size (because of highdpi).
@@ -667,22 +669,25 @@ static void CreateUpscaledTexture(boolea
h_upscale_old = h_upscale;
w_upscale_old = w_upscale;
- if (texture_upscaled)
- {
- SDL_DestroyTexture(texture_upscaled);
- }
-
// Set the scaling quality for rendering the upscaled texture to "linear",
// which looks much softer and smoother than "nearest" but does a better
// job at downscaling from the upscaled texture to screen.
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
- texture_upscaled = SDL_CreateTexture(renderer,
+ new_texture = SDL_CreateTexture(renderer,
pixel_format,
SDL_TEXTUREACCESS_TARGET,
w_upscale*SCREENWIDTH,
h_upscale*SCREENHEIGHT);
+
+ old_texture = texture_upscaled;
+ texture_upscaled = new_texture;
+
+ if (old_texture != NULL)
+ {
+ SDL_DestroyTexture(old_texture);
+ }
}
// [AM] Fractional part of the current tic, in the half-open
From cf3420556ac1d4867160582ba2490562c6b1c588 Mon Sep 17 00:00:00 2001
From: Fabian Greffrath <fabian@greffrath.com>
Date: Thu, 28 Feb 2019 12:47:34 +0100
Subject: [PATCH 2/2] heretic: include "i_system.h" for I_Realloc()
---
src/heretic/r_segs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/heretic/r_segs.c b/src/heretic/r_segs.c
index d8da74dd..28d46bf9 100644
--- a/src/heretic/r_segs.c
+++ b/src/heretic/r_segs.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "doomdef.h"
+#include "i_system.h" // [crispy] I_Realloc()
#include "r_local.h"
// OPTIMIZE: closed two sided lines as single sided
--
2.20.1
From 05c3023d2b891c2d4361822b439c59e5828eee79 Mon Sep 17 00:00:00 2001
From: Fabian Greffrath <fabian@greffrath.com>
Date: Fri, 21 Dec 2018 13:14:56 +0100
Subject: [PATCH 4/7] video: point destroyed textures to NULL
When a renderer gets destroyed, all associated textures get destroyed
as well, so point them to NULL to prevent them being destroyed again.
---
src/i_video.c | 3 +++
1 file changed, 3 insertions(+)
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1320,6 +1320,9 @@ void SetVideoMode(boolean resize_fb) //
if (renderer != NULL)
{
SDL_DestroyRenderer(renderer);
+ // all associated textures get destroyed
+ texture = NULL;
+ texture_upscaled = NULL;
}
renderer = SDL_CreateRenderer(screen, -1, renderer_flags);
0001-video-create-new-texture-before-destroying-old-one.patch
0004-video-point-destroyed-textures-to-NULL.patch
no_server.patch
0001-only-draw-revealed-secret-sector-boundaries-in-gold-.patch
0002-heretic-include-i_system.h-for-I_Realloc.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment