From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- .../files/sdl-sopwith-1.7.5-video-fix.patch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch (limited to 'games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch') diff --git a/games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch b/games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch new file mode 100644 index 000000000000..e9da16c43905 --- /dev/null +++ b/games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch @@ -0,0 +1,24 @@ +Upstream patch: fix segfault while video device detection. +Discovered here - https://bugs.gentoo.org/show_bug.cgi?id=458504 + +--- a/src/sdl/video.c.orig 2013-02-21 11:48:57.000000000 -0400 ++++ b/src/sdl/video.c 2013-02-21 11:49:35.000000000 -0400 +@@ -364,11 +364,17 @@ + int n; + int w, h; + int flags = 0; ++ int status; + + printf("CGA Screen Emulation\n"); + printf("init screen: "); + +- SDL_Init(SDL_INIT_VIDEO); ++ status = SDL_Init(SDL_INIT_VIDEO); ++ if (status == -1) ++ { ++ fprintf(stderr, "Unable to locate video device. Exiting.\n"); ++ exit(1); ++ } + + srand(time(NULL)); + set_icon(symbol_plane[rand() % 2][rand() % 16]); -- cgit v1.2.3