[mupen64plus-core] 215/310: Fix compiling against SDL2

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:58:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-core.

commit b301e7f8354cc614c6fc99a7a7a47d402eea4d90
Author: Sven Eckelmann <sven at narfation.org>
Date:   Mon Jun 10 19:42:24 2013 +0200

    Fix compiling against SDL2
---
 debian/changelog                 |  2 ++
 debian/patches/sdl2_resize.patch | 34 ++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 3 files changed, 37 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f196e48..13922e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ mupen64plus-core (2.0~rc3+3+5d46baa3dd76-2) UNRELEASED; urgency=low
     - Switch from SDL 1.2 to SDL 2.0
   * debian/control:
     - Depend on libsdl2-dev instead of libsdl1.2-dev
+  * debian/patches:
+    - Add sdl2_resize.patch, Fix compiling against SDL2
 
  -- Sven Eckelmann <sven at narfation.org>  Sun, 09 Jun 2013 22:51:15 +0200
 
diff --git a/debian/patches/sdl2_resize.patch b/debian/patches/sdl2_resize.patch
new file mode 100644
index 0000000..d8ba519
--- /dev/null
+++ b/debian/patches/sdl2_resize.patch
@@ -0,0 +1,34 @@
+Description: Fix compiling against SDL2
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/src/main/eventloop.c b/src/main/eventloop.c
+index 633a697399c9b9efb793749d5b70022db08c8ce9..e16141d6b775ed7410069d78aebaab2668c5f84e 100644
+--- a/src/main/eventloop.c
++++ b/src/main/eventloop.c
+@@ -259,12 +259,25 @@ static int SDLCALL event_sdl_filter(void *userdata, SDL_Event *event)
+ #endif
+             return 0;
+ 
++#if SDL_VERSION_ATLEAST(2,0,0)
++        case SDL_WINDOWEVENT:
++            switch (event->window.event) {
++                case SDL_WINDOWEVENT_RESIZED:
++                    // call the video plugin.  if the video plugin supports resizing, it will resize its viewport and call
++                    // VidExt_ResizeWindow to update the window manager handling our opengl output window
++                    gfx.resizeVideoOutput(event->window.data1, event->window.data2);
++                    return 0;  // consumed the event
++                    break;
++            }
++            break;
++#else
+         case SDL_VIDEORESIZE:
+             // call the video plugin.  if the video plugin supports resizing, it will resize its viewport and call
+             // VidExt_ResizeWindow to update the window manager handling our opengl output window
+             gfx.resizeVideoOutput(event->resize.w, event->resize.h);
+             return 0;  // consumed the event
+             break;
++#endif
+ 
+         // if joystick action is detected, check if it's mapped to a special function
+         case SDL_JOYAXISMOTION:
diff --git a/debian/patches/series b/debian/patches/series
index f2b4630..c775659 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 dejavu-font.patch
 printf_fixup.patch
 disable_recompiler_disassembler.patch
+sdl2_resize.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-core.git



More information about the Pkg-games-commits mailing list