From 8ac75024bfeb752ba6815401ef4b63cf79e3ae50 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 20 Oct 2014 14:59:55 +0200 Subject: [PATCH] Fix window size problem in SDL+OpenGL. --- .../libsdl/patches/libsdl-1.2.15.patchset | 53 +++++++++++++------ 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/media-libs/libsdl/patches/libsdl-1.2.15.patchset b/media-libs/libsdl/patches/libsdl-1.2.15.patchset index 8d2190833..09563772d 100644 --- a/media-libs/libsdl/patches/libsdl-1.2.15.patchset +++ b/media-libs/libsdl/patches/libsdl-1.2.15.patchset @@ -1,4 +1,4 @@ -From ca09de99c346e44cdd1f578848b4958067b5fb06 Mon Sep 17 00:00:00 2001 +From 115505e17228751511a628f80164c72c526a6331 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Nov 2013 23:38:56 +0100 Subject: Remove Alsa and ESD detection @@ -36,7 +36,7 @@ index 08c8e1e..84d9a55 100644 1.8.3.4 -From 735586f7d0600476b0b02206daa76926193da957 Mon Sep 17 00:00:00 2001 +From 6faa61b9acc255a387effb5c681c13eb491aae0d Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Nov 2013 23:39:26 +0100 Subject: Fix samples vs bytes issues @@ -67,7 +67,7 @@ index de635f8..7faf571 100644 1.8.3.4 -From 164201f49d1310bdd229feaf33c1f0e988a89f49 Mon Sep 17 00:00:00 2001 +From 6e1c58184451e2bc594dfe06ac20b414dc1901db Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Nov 2013 23:40:12 +0100 Subject: Various fixes to the video code @@ -147,7 +147,7 @@ index c32b661..a26f18b 100644 1.8.3.4 -From ae129e6505148189a3d73fc085f20e214c0d6446 Mon Sep 17 00:00:00 2001 +From b23618466a5eb0185d3305a2013182f9798f4677 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 23 Nov 2013 11:59:00 +0100 Subject: Actually fix the sample vs bytes problem in audio driver. @@ -201,7 +201,7 @@ index 7faf571..300bf03 100644 1.8.3.4 -From 9b20d4dc8a3f5d607623b5d8b2c4ce14e830f4c8 Mon Sep 17 00:00:00 2001 +From 997f4ae84c40328a42fe8daadca0c49e33a650e4 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Sun, 22 Dec 2013 18:37:30 -0700 Subject: Remove Haiku from specialized DECLSPEC definition @@ -224,7 +224,7 @@ index 27e2f7b..d5e2f1f 100644 1.8.3.4 -From 09ba1fa7eccef32323c9987bdd4742bca6e9dfbc Mon Sep 17 00:00:00 2001 +From 6d189890324b05880651ceef3854c0443cb0aa33 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 5 Jan 2014 17:22:10 +0100 Subject: Change prefix from "be" to "os" for OpenGL includes @@ -247,18 +247,13 @@ index f2b19a2..2cb94ee 100644 -- 1.8.3.4 -From a1a8ccda9449d9f0dc61708fcc35530fbbaf7644 Mon Sep 17 00:00:00 2001 + +From fa40bd88fd254203afedf3a74a449f9d485ef0da Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Fri, 28 Mar 2014 18:04:12 +0100 -Subject: [PATCH] Fix compilation on x86_64 +Subject: Fix compilation on x86_64 Also cleans up and fixes warnings. ---- - src/video/SDL_sysvideo.h | 8 ++++++++ - src/video/SDL_video.c | 2 +- - src/video/bwindow/SDL_sysvideo.cc | 22 +++++++++------------- - src/video/bwindow/SDL_sysyuv.cc | 3 ++- - 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h index 436450e..b45a8a9 100644 @@ -385,5 +380,33 @@ index 7c71b00..f2fef10 100644 return 0; } -- -Jonathan +1.8.3.4 + + +From 2fe875387acc77af6bea3527544098c62b172643 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Mon, 20 Oct 2014 13:33:55 +0200 +Subject: Fix problem with GL viewport + +Make sure the window has the correct size before the GL view is created. +Otherwise the view doesn't use the resized window size and things render +in an awfully small area in the corner of the window. + +Fixes Dragon Memory, for example (also seen in other games using SDL+GL). + +diff --git a/src/video/bwindow/SDL_sysvideo.cc b/src/video/bwindow/SDL_sysvideo.cc +index 5d4077f..7e1bd38 100644 +--- a/src/video/bwindow/SDL_sysvideo.cc ++++ b/src/video/bwindow/SDL_sysvideo.cc +@@ -507,6 +507,8 @@ SDL_Surface *BE_SetVideoMode(_THIS, SDL_Surface *current, + BRect bounds; + Uint32 gl_flags = 0; + ++ SDL_Win->ResizeTo(width, height); ++ + /* Only RGB works on r5 currently */ + gl_flags = BGL_RGB; + if (_this->gl_config.double_buffer) +-- +1.8.3.4