libsdl2: bump version.

remove old recipes and patches.
This commit is contained in:
Jerome Duval
2019-03-30 13:21:30 +01:00
parent 9effe8df4f
commit 2d027471f1
10 changed files with 76 additions and 1396 deletions

View File

@@ -1,88 +0,0 @@
SUMMARY="Simple Direct Media Layer 2.0"
DESCRIPTION="Simple DirectMedia Layer is a cross-platform development library \
designed to provide low level access to audio, keyboard, mouse, joystick, and \
graphics hardware via OpenGL and Direct3D. It is used by video playback \
software, emulators, and popular games."
HOMEPAGE="http://www.libsdl.org/"
COPYRIGHT="1997-2014 Sam Lantinga"
LICENSE="Zlib"
REVISION="2"
SOURCE_URI="http://www.libsdl.org/release/SDL2-$portVersion.tar.gz"
CHECKSUM_SHA256="a5a69a6abf80bcce713fa873607735fe712f44276a7f048d60a61bb2f6b3c90c"
SOURCE_DIR="SDL2-$portVersion"
PATCHES="libsdl2-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
libsdl2$secondaryArchSuffix = $portVersion compat >= 2.0
lib:libSDL2$secondaryArchSuffix = 0.2.1 compat >= 0
lib:libSDL2_2.0$secondaryArchSuffix = 0.2.1 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
"
PROVIDES_devel="
libsdl2${secondaryArchSuffix}_devel = $portVersion compat >= 2.0
cmd:sdl2_config$secondaryArchSuffix = $portVersion compat >= 2.0
devel:libSDL2$secondaryArchSuffix = 0.2.1 compat >= 0
devel:libSDL2_2.0$secondaryArchSuffix = 0.2.1 compat >= 0
devel:libSDL2_test$secondaryArchSuffix = 0.2.1 compat >= 0
devel:libSDL2main$secondaryArchSuffix = 0.2.1 compat >= 0
"
REQUIRES_devel="
libsdl2$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:gettext
cmd:ld$secondaryArchSuffix
cmd:libtool
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:which
"
PATCH()
{
if [ $effectiveTargetArchitecture != "x86_gcc2" ]; then
sed -i 's/lstdc++.r4/lstdc++/' configure.in
fi
}
BUILD()
{
autoreconf -fi
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
# devel package
prepareInstalledDevelLibs \
libSDL2 \
libSDL2main \
libSDL2_test \
libSDL2-2.0
fixPkgconfig
fixDevelopLibDirReferences $binDir/sdl2-config
packageEntries devel \
$developDir $binDir/sdl2-config $dataDir
}

View File

@@ -1,88 +0,0 @@
SUMMARY="Simple Direct Media Layer 2.0"
DESCRIPTION="Simple DirectMedia Layer is a cross-platform development library \
designed to provide low level access to audio, keyboard, mouse, joystick, and \
graphics hardware via OpenGL and Direct3D. It is used by video playback \
software, emulators, and popular games."
HOMEPAGE="http://www.libsdl.org/"
COPYRIGHT="1997-2014 Sam Lantinga"
LICENSE="Zlib"
REVISION="2"
SOURCE_URI="http://www.libsdl.org/release/SDL2-$portVersion.tar.gz"
CHECKSUM_SHA256="da55e540bf6331824153805d58b590a29c39d2d506c6d02fa409aedeab21174b"
SOURCE_DIR="SDL2-$portVersion"
PATCHES="libsdl2-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
libsdl2$secondaryArchSuffix = $portVersion compat >= 2.0
lib:libSDL2$secondaryArchSuffix = 0.4.0 compat >= 0
lib:libSDL2_2.0$secondaryArchSuffix = 0.4.0 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
"
PROVIDES_devel="
libsdl2${secondaryArchSuffix}_devel = $portVersion compat >= 2.0
cmd:sdl2_config$secondaryArchSuffix = $portVersion compat >= 2.0
devel:libSDL2$secondaryArchSuffix = 0.4.0 compat >= 0
devel:libSDL2_2.0$secondaryArchSuffix = 0.4.0 compat >= 0
devel:libSDL2_test$secondaryArchSuffix = 0.4.0 compat >= 0
devel:libSDL2main$secondaryArchSuffix = 0.4.0 compat >= 0
"
REQUIRES_devel="
libsdl2$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:gettext
cmd:ld$secondaryArchSuffix
cmd:libtool
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:which
"
PATCH()
{
if [ $effectiveTargetArchitecture != "x86_gcc2" ]; then
sed -i 's/lstdc++.r4/lstdc++/' configure.in
fi
}
BUILD()
{
autoreconf -fi
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
# devel package
prepareInstalledDevelLibs \
libSDL2 \
libSDL2main \
libSDL2_test \
libSDL2-2.0
fixPkgconfig
fixDevelopLibDirReferences $binDir/sdl2-config
packageEntries devel \
$developDir $binDir/sdl2-config $dataDir
}

View File

@@ -1,92 +0,0 @@
SUMMARY="Simple Direct Media Layer 2.0"
DESCRIPTION="Simple DirectMedia Layer is a cross-platform development library \
designed to provide low level access to audio, keyboard, mouse, joystick, and \
graphics hardware via OpenGL and Direct3D. It is used by video playback \
software, emulators, and popular games."
HOMEPAGE="http://www.libsdl.org/"
COPYRIGHT="1997-2016 Sam Lantinga"
LICENSE="Zlib"
REVISION="4"
SOURCE_URI="http://www.libsdl.org/release/SDL2-$portVersion.tar.gz"
CHECKSUM_SHA256="442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785"
SOURCE_DIR="SDL2-$portVersion"
PATCHES="libsdl2-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
libsdl2$secondaryArchSuffix = $portVersion compat >= 2.0
lib:libSDL2$secondaryArchSuffix = 0.5.0 compat >= 0
lib:libSDL2_2.0$secondaryArchSuffix = 0.5.0 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libltdl$secondaryArchSuffix
"
PROVIDES_devel="
libsdl2${secondaryArchSuffix}_devel = $portVersion compat >= 2.0
cmd:sdl2_config$secondaryArchSuffix = $portVersion compat >= 2.0
devel:libSDL2$secondaryArchSuffix = 0.5.0 compat >= 0
devel:libSDL2_2.0$secondaryArchSuffix = 0.5.0 compat >= 0
devel:libSDL2_test$secondaryArchSuffix = 0.5.0 compat >= 0
devel:libSDL2main$secondaryArchSuffix = 0.5.0 compat >= 0
"
REQUIRES_devel="
libsdl2$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libltdl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:gettext
cmd:ld$secondaryArchSuffix
cmd:libtool
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:which
"
PATCH()
{
if [ $effectiveTargetArchitecture != "x86_gcc2" ]; then
sed -i 's/lstdc++.r4/lstdc++/' configure.in
fi
}
BUILD()
{
autoreconf -fi
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libSDL*.la
# devel package
prepareInstalledDevelLibs \
libSDL2 \
libSDL2main \
libSDL2_test \
libSDL2-2.0
fixPkgconfig
fixDevelopLibDirReferences $binDir/sdl2-config
packageEntries devel \
$developDir $binDir/sdl2-config $dataDir
}

View File

@@ -1,83 +0,0 @@
SUMMARY="Simple Direct Media Layer 2.0"
DESCRIPTION="Simple DirectMedia Layer is a cross-platform development library \
designed to provide low level access to audio, keyboard, mouse, joystick, and \
graphics hardware via OpenGL and Direct3D. It is used by video playback \
software, emulators, and popular games."
HOMEPAGE="http://www.libsdl.org/"
COPYRIGHT="1997-2017 Sam Lantinga"
LICENSE="Zlib"
REVISION="3"
SOURCE_URI="http://www.libsdl.org/release/SDL2-$portVersion.tar.gz"
CHECKSUM_SHA256="ee35c74c4313e2eda104b14b1b86f7db84a04eeab9430d56e001cea268bf4d5e"
SOURCE_DIR="SDL2-$portVersion"
PATCHES="libsdl2-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
libsdl2$secondaryArchSuffix = $portVersion compat >= 2.0
lib:libSDL2_2.0$secondaryArchSuffix = 0.7.0 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libltdl$secondaryArchSuffix
"
PROVIDES_devel="
libsdl2${secondaryArchSuffix}_devel = $portVersion compat >= 2.0
cmd:sdl2_config$secondaryArchSuffix = $portVersion compat >= 2.0
devel:libSDL2$secondaryArchSuffix = 0.7.0 compat >= 0
devel:libSDL2_2.0$secondaryArchSuffix = 0.7.0 compat >= 0
devel:libSDL2_test$secondaryArchSuffix = 0.7.0 compat >= 0
devel:libSDL2main$secondaryArchSuffix = 0.7.0 compat >= 0
"
REQUIRES_devel="
libsdl2$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:gettext
cmd:ld$secondaryArchSuffix
cmd:libtool
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:which
"
BUILD()
{
autoreconf -fi
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libSDL*.la
# devel package
prepareInstalledDevelLibs \
libSDL2 \
libSDL2main \
libSDL2_test \
libSDL2-2.0
fixPkgconfig
fixDevelopLibDirReferences $binDir/sdl2-config
packageEntries devel \
$developDir $binDir/sdl2-config $dataDir $libDir/cmake
}

View File

@@ -6,9 +6,9 @@ software, emulators, and popular games."
HOMEPAGE="https://www.libsdl.org/"
COPYRIGHT="1997-2018 Sam Lantinga"
LICENSE="Zlib"
REVISION="8"
REVISION="1"
SOURCE_URI="https://www.libsdl.org/release/SDL2-$portVersion.tar.gz"
CHECKSUM_SHA256="edc77c57308661d576e843344d8638e025a7818bff73f8fbfab09c3c5fd092ec"
CHECKSUM_SHA256="255186dc676ecd0c1dbf10ec8a2cc5d6869b5079d8a38194c2aecdff54b324b1"
SOURCE_DIR="SDL2-$portVersion"
PATCHES="libsdl2-$portVersion.patchset"
@@ -17,7 +17,7 @@ SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
libsdl2$secondaryArchSuffix = $portVersion compat >= 2.0
lib:libSDL2_2.0$secondaryArchSuffix = 0.8.0 compat >= 0
lib:libSDL2_2.0$secondaryArchSuffix = 0.9.0 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -29,10 +29,10 @@ REQUIRES="
PROVIDES_devel="
libsdl2${secondaryArchSuffix}_devel = $portVersion compat >= 2.0
cmd:sdl2_config$secondaryArchSuffix = $portVersion compat >= 2.0
devel:libSDL2$secondaryArchSuffix = 0.8.0 compat >= 0
devel:libSDL2_2.0$secondaryArchSuffix = 0.8.0 compat >= 0
devel:libSDL2_test$secondaryArchSuffix = 0.8.0 compat >= 0
devel:libSDL2main$secondaryArchSuffix = 0.8.0 compat >= 0
devel:libSDL2$secondaryArchSuffix = 0.9.0 compat >= 0
devel:libSDL2_2.0$secondaryArchSuffix = 0.9.0 compat >= 0
devel:libSDL2_test$secondaryArchSuffix = 0.9.0 compat >= 0
devel:libSDL2main$secondaryArchSuffix = 0.9.0 compat >= 0
"
REQUIRES_devel="
libsdl2$secondaryArchSuffix == $portVersion base
@@ -57,7 +57,6 @@ BUILD_PREREQUIRES="
BUILD()
{
autoreconf -fi
runConfigure ./configure
make $jobArgs
}

View File

@@ -1,176 +0,0 @@
From 3f0701d67fbbd5398c8c7cdbc41faa62d16aea85 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 29 Aug 2014 15:24:11 +0000
Subject: haiku patch
diff --git a/configure.in b/configure.in
index 3d8a2de..aab5ced 100644
--- a/configure.in
+++ b/configure.in
@@ -276,7 +276,7 @@ if test x$enable_libc = xyes; then
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
AC_CHECK_FUNCS(iconv)
- AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE(HAVE_SA_SIGACTION)], ,[#include <signal.h>])
+ AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], [], [Description])], ,[#include <signal.h>])
fi
dnl AC_CHECK_SIZEOF(void*)
@@ -1427,7 +1427,7 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
],[
],[
have_const_param_XextAddDisplay=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY], [], [Description])
])
AC_MSG_RESULT($have_const_param_XextAddDisplay)
@@ -1439,7 +1439,7 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
],[
],[
have_const_param_xdata32=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32], [], [Description])
])
AC_MSG_RESULT($have_const_param_xdata32)
@@ -1457,7 +1457,7 @@ XGetEventData(display, cookie);
XFreeEventData(display, cookie);
],[
have_XGenericEvent=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS], [], [Description])
])
AC_MSG_RESULT($have_XGenericEvent)
@@ -1557,7 +1557,7 @@ int event_type = XI_TouchBegin;
XITouchClassInfo *t;
],[
have_xinput2_multitouch=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [], [Description])
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
])
AC_MSG_RESULT($have_xinput2_multitouch)
@@ -2281,7 +2281,7 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]])
sem_timedwait(NULL, NULL);
],[
have_sem_timedwait=yes
- AC_DEFINE(HAVE_SEM_TIMEDWAIT)
+ AC_DEFINE([HAVE_SEM_TIMEDWAIT], [], [Description])
])
AC_MSG_RESULT($have_sem_timedwait)
fi
@@ -2936,7 +2936,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
fi
# The Haiku platform requires special setup.
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding -lstdc++.r4"
;;
arm*-apple-darwin*)
# iOS - We are not writing anything to confdefs.h because you have to replace
diff --git a/src/thread/pthread/SDL_systhread.c b/src/thread/pthread/SDL_systhread.c
index b570b2a..80dfa1c 100644
--- a/src/thread/pthread/SDL_systhread.c
+++ b/src/thread/pthread/SDL_systhread.c
@@ -52,7 +52,7 @@
#endif
#ifdef __HAIKU__
-#include <be/kernel/OS.h>
+#include <kernel/OS.h>
#endif
#include "SDL_assert.h"
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index e6de5b0..e8aeabf 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -38,9 +38,9 @@ extern "C" {
#include <stdio.h>
#include <AppKit.h>
#include <InterfaceKit.h>
-#include <be/game/DirectWindow.h>
+#include <game/DirectWindow.h>
#if SDL_VIDEO_OPENGL
-#include <be/opengl/GLView.h>
+#include <opengl/GLView.h>
#endif
#include "SDL_events.h"
#include "../../main/haiku/SDL_BApp.h"
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index 245cec1..52ee67a 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -56,7 +56,7 @@ int BE_GL_LoadLibrary(_THIS, const char *path)
if( get_image_symbol(info.id, "glBegin", B_SYMBOL_TYPE_ANY,
&location) == B_OK) {
- _this->gl_config.dll_handle = (void *) info.id;
+ _this->gl_config.dll_handle = (void *)(addr_t) info.id;
_this->gl_config.driver_loaded = 1;
SDL_strlcpy(_this->gl_config.driver_path, "libGL.so",
SDL_arraysize(_this->gl_config.driver_path));
@@ -71,7 +71,7 @@ void *BE_GL_GetProcAddress(_THIS, const char *proc)
void *location = NULL;
status_t err;
if ((err =
- get_image_symbol((image_id) _this->gl_config.dll_handle,
+ get_image_symbol((image_id)(addr_t) _this->gl_config.dll_handle,
proc, B_SYMBOL_TYPE_ANY,
&location)) == B_OK) {
return location;
--
1.8.3.4
From 344472b0218ba8acbc535c0c456ede1c1008ad67 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 3 Sep 2014 19:22:12 +0200
Subject: Fix null pointer dereference.
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index 52ee67a..2f0073d 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -93,7 +93,8 @@ void BE_GL_SwapWindow(_THIS, SDL_Window * window) {
}
int BE_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) {
- _GetBeApp()->SetCurrentContext(((SDL_BWin*)context)->GetGLView());
+ SDL_BWin* win = (SDL_BWin*)context;
+ _GetBeApp()->SetCurrentContext(win ? win->GetGLView() : NULL);
return 0;
}
--
1.8.3.4
From 4c1fe53d13c6cada30bcb1606308487154003d9a Mon Sep 17 00:00:00 2001
From: Puck Meerburg <puck@puckipedia.nl>
Date: Sat, 17 Jan 2015 19:33:32 +0100
Subject: SDL_BApp: Make sure _current_context isn't NULL before trying to lock
it
diff --git a/src/main/haiku/SDL_BApp.h b/src/main/haiku/SDL_BApp.h
index 1e4a0f5..a13ea3b 100644
--- a/src/main/haiku/SDL_BApp.h
+++ b/src/main/haiku/SDL_BApp.h
@@ -193,7 +193,8 @@ public:
if(_current_context)
_current_context->UnlockGL();
_current_context = newContext;
- _current_context->LockGL();
+ if (_current_context)
+ _current_context->LockGL();
}
private:
/* Event management */
--
1.8.3.4

View File

@@ -1,266 +0,0 @@
From 1411b340e473e75344ce336b89326fefd5962821 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 29 Aug 2014 15:24:11 +0000
Subject: haiku patch
diff --git a/configure.in b/configure.in
index f585d01..47186d6 100644
--- a/configure.in
+++ b/configure.in
@@ -276,7 +276,7 @@ if test x$enable_libc = xyes; then
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
AC_CHECK_FUNCS(iconv)
- AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE(HAVE_SA_SIGACTION)], ,[#include <signal.h>])
+ AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], [], [Description])], ,[#include <signal.h>])
fi
dnl AC_CHECK_SIZEOF(void*)
@@ -1466,7 +1466,7 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
],[
],[
have_const_param_XextAddDisplay=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY], [], [Description])
])
AC_MSG_RESULT($have_const_param_XextAddDisplay)
@@ -1484,7 +1484,7 @@ XGetEventData(display, cookie);
XFreeEventData(display, cookie);
],[
have_XGenericEvent=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS], [], [Description])
])
AC_MSG_RESULT($have_XGenericEvent)
@@ -1598,7 +1598,7 @@ int event_type = XI_TouchBegin;
XITouchClassInfo *t;
],[
have_xinput2_multitouch=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [], [Description])
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
])
AC_MSG_RESULT($have_xinput2_multitouch)
@@ -2451,7 +2451,7 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]])
sem_timedwait(NULL, NULL);
],[
have_sem_timedwait=yes
- AC_DEFINE(HAVE_SEM_TIMEDWAIT)
+ AC_DEFINE([HAVE_SEM_TIMEDWAIT], [], [Description])
])
AC_MSG_RESULT($have_sem_timedwait)
fi
@@ -3188,7 +3188,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
fi
# The Haiku platform requires special setup.
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding -lstdc++.r4"
;;
arm*-apple-darwin*)
# iOS - We are not writing anything to confdefs.h because you have to replace
diff --git a/src/thread/pthread/SDL_systhread.c b/src/thread/pthread/SDL_systhread.c
index 22f7bd5..486cf69 100644
--- a/src/thread/pthread/SDL_systhread.c
+++ b/src/thread/pthread/SDL_systhread.c
@@ -53,7 +53,7 @@
#endif
#ifdef __HAIKU__
-#include <be/kernel/OS.h>
+#include <kernel/OS.h>
#endif
#include "SDL_assert.h"
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index dade664..416c30c 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -38,9 +38,9 @@ extern "C" {
#include <stdio.h>
#include <AppKit.h>
#include <InterfaceKit.h>
-#include <be/game/DirectWindow.h>
+#include <game/DirectWindow.h>
#if SDL_VIDEO_OPENGL
-#include <be/opengl/GLView.h>
+#include <opengl/GLView.h>
#endif
#include "SDL_events.h"
#include "../../main/haiku/SDL_BApp.h"
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index 15454f1..c42a910 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -56,7 +56,7 @@ int BE_GL_LoadLibrary(_THIS, const char *path)
if( get_image_symbol(info.id, "glBegin", B_SYMBOL_TYPE_ANY,
&location) == B_OK) {
- _this->gl_config.dll_handle = (void *) info.id;
+ _this->gl_config.dll_handle = (void *)(addr_t) info.id;
_this->gl_config.driver_loaded = 1;
SDL_strlcpy(_this->gl_config.driver_path, "libGL.so",
SDL_arraysize(_this->gl_config.driver_path));
@@ -71,7 +71,7 @@ void *BE_GL_GetProcAddress(_THIS, const char *proc)
void *location = NULL;
status_t err;
if ((err =
- get_image_symbol((image_id) _this->gl_config.dll_handle,
+ get_image_symbol((image_id)(addr_t) _this->gl_config.dll_handle,
proc, B_SYMBOL_TYPE_ANY,
&location)) == B_OK) {
return location;
--
2.2.2
From 2969992d8368ee4c9661552897fb2d98e4180009 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 3 Sep 2014 19:22:12 +0200
Subject: Fix null pointer dereference.
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index c42a910..4d98641 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -93,7 +93,8 @@ void BE_GL_SwapWindow(_THIS, SDL_Window * window) {
}
int BE_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) {
- _GetBeApp()->SetCurrentContext(((SDL_BWin*)context)->GetGLView());
+ SDL_BWin* win = (SDL_BWin*)context;
+ _GetBeApp()->SetCurrentContext(win ? win->GetGLView() : NULL);
return 0;
}
--
2.2.2
From 1aabf6b42b4ede813ede6a7143e717359e9fe920 Mon Sep 17 00:00:00 2001
From: Puck Meerburg <puck@puckipedia.nl>
Date: Sat, 17 Jan 2015 19:33:32 +0100
Subject: SDL_BApp: Make sure _current_context isn't NULL before trying to lock
it
diff --git a/src/main/haiku/SDL_BApp.h b/src/main/haiku/SDL_BApp.h
index 157c236..220bf7a 100644
--- a/src/main/haiku/SDL_BApp.h
+++ b/src/main/haiku/SDL_BApp.h
@@ -193,7 +193,8 @@ public:
if(_current_context)
_current_context->UnlockGL();
_current_context = newContext;
- _current_context->LockGL();
+ if (_current_context)
+ _current_context->LockGL();
}
private:
/* Event management */
--
2.2.2
From 7191972735818e39e3c02e1a69ffc88f67a377ab Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 25 Feb 2016 20:23:41 +0000
Subject: remove nacl, missing templates on Haiku
diff --git a/configure.in b/configure.in
index 47186d6..5fcfeec 100644
--- a/configure.in
+++ b/configure.in
@@ -1317,32 +1317,6 @@ AC_HELP_STRING([--enable-mir-shared], [dynamically load Mir support [[default=ma
fi
}
-dnl Check for Native Client stuff
-CheckNativeClient()
-{
- AC_TRY_COMPILE([
- #if !defined(__native_client__)
- #error "NO NACL"
- #endif
- ],[
- ],[
- AC_DEFINE(SDL_VIDEO_DRIVER_NACL)
- AC_DEFINE(SDL_AUDIO_DRIVER_NACL)
- AC_DEFINE(HAVE_POW, 1, [ ])
- AC_DEFINE(HAVE_OPENGLES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
-
- SDL_LIBS="-lppapi_simple -lppapi_gles2 $SDL_LIBS"
-
- SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
- SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
- SUMMARY_audio="${SUMMARY_audio} nacl"
- SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
- SUMMARY_video="${SUMMARY_video} nacl opengles2"
- ])
-}
-
dnl Find the X11 include and library directories
CheckX11()
--
2.2.2
From c69f84542f84c2a40dd811c6524fa862fefff276 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Mon, 11 Jul 2016 15:39:01 +0200
Subject: Try to find correct application signature from app resources
Instead of always hardcoding application/x-SDL-executable.
diff --git a/src/main/haiku/SDL_BeApp.cc b/src/main/haiku/SDL_BeApp.cc
index 36c2a1a..4676c58 100644
--- a/src/main/haiku/SDL_BeApp.cc
+++ b/src/main/haiku/SDL_BeApp.cc
@@ -25,8 +25,10 @@
/* Handle the BeApp specific portions of the application */
#include <AppKit.h>
+#include <storage/AppFileInfo.h>
#include <storage/Path.h>
#include <storage/Entry.h>
+#include <storage/File.h>
#include <unistd.h>
#include "SDL_BApp.h" /* SDL_BApp class definition */
@@ -49,7 +51,24 @@ StartBeApp(void *unused)
{
BApplication *App;
- App = new SDL_BApp("application/x-SDL-executable");
+ // default application signature
+ const char *signature = "application/x-SDL-executable";
+ // dig resources for correct signature
+ image_info info;
+ int32 cookie = 0;
+ if (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
+ BFile f(info.name, O_RDONLY);
+ if (f.InitCheck() == B_OK) {
+ BAppFileInfo app_info(&f);
+ if (app_info.InitCheck() == B_OK) {
+ char sig[B_MIME_TYPE_LENGTH];
+ if (app_info.GetSignature(sig) == B_OK)
+ signature = strndup(sig, B_MIME_TYPE_LENGTH);
+ }
+ }
+ }
+
+ App = new SDL_BApp(signature);
App->Run();
delete App;
--
2.8.0

View File

@@ -1,319 +0,0 @@
From 1411b340e473e75344ce336b89326fefd5962821 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 29 Aug 2014 15:24:11 +0000
Subject: haiku patch
diff --git a/configure.in b/configure.in
index f585d01..47186d6 100644
--- a/configure.in
+++ b/configure.in
@@ -276,7 +276,7 @@ if test x$enable_libc = xyes; then
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
AC_CHECK_FUNCS(iconv)
- AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE(HAVE_SA_SIGACTION)], ,[#include <signal.h>])
+ AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], [], [Description])], ,[#include <signal.h>])
fi
dnl AC_CHECK_SIZEOF(void*)
@@ -1466,7 +1466,7 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
],[
],[
have_const_param_XextAddDisplay=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY], [], [Description])
])
AC_MSG_RESULT($have_const_param_XextAddDisplay)
@@ -1484,7 +1484,7 @@ XGetEventData(display, cookie);
XFreeEventData(display, cookie);
],[
have_XGenericEvent=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS], [], [Description])
])
AC_MSG_RESULT($have_XGenericEvent)
@@ -1598,7 +1598,7 @@ int event_type = XI_TouchBegin;
XITouchClassInfo *t;
],[
have_xinput2_multitouch=yes
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH)
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [], [Description])
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
])
AC_MSG_RESULT($have_xinput2_multitouch)
@@ -2451,7 +2451,7 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]])
sem_timedwait(NULL, NULL);
],[
have_sem_timedwait=yes
- AC_DEFINE(HAVE_SEM_TIMEDWAIT)
+ AC_DEFINE([HAVE_SEM_TIMEDWAIT], [], [Description])
])
AC_MSG_RESULT($have_sem_timedwait)
fi
@@ -3188,7 +3188,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
fi
# The Haiku platform requires special setup.
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding -lstdc++.r4"
;;
arm*-apple-darwin*)
# iOS - We are not writing anything to confdefs.h because you have to replace
diff --git a/src/thread/pthread/SDL_systhread.c b/src/thread/pthread/SDL_systhread.c
index 22f7bd5..486cf69 100644
--- a/src/thread/pthread/SDL_systhread.c
+++ b/src/thread/pthread/SDL_systhread.c
@@ -53,7 +53,7 @@
#endif
#ifdef __HAIKU__
-#include <be/kernel/OS.h>
+#include <kernel/OS.h>
#endif
#include "SDL_assert.h"
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index dade664..416c30c 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -38,9 +38,9 @@ extern "C" {
#include <stdio.h>
#include <AppKit.h>
#include <InterfaceKit.h>
-#include <be/game/DirectWindow.h>
+#include <game/DirectWindow.h>
#if SDL_VIDEO_OPENGL
-#include <be/opengl/GLView.h>
+#include <opengl/GLView.h>
#endif
#include "SDL_events.h"
#include "../../main/haiku/SDL_BApp.h"
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index 15454f1..c42a910 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -56,7 +56,7 @@ int BE_GL_LoadLibrary(_THIS, const char *path)
if( get_image_symbol(info.id, "glBegin", B_SYMBOL_TYPE_ANY,
&location) == B_OK) {
- _this->gl_config.dll_handle = (void *) info.id;
+ _this->gl_config.dll_handle = (void *)(addr_t) info.id;
_this->gl_config.driver_loaded = 1;
SDL_strlcpy(_this->gl_config.driver_path, "libGL.so",
SDL_arraysize(_this->gl_config.driver_path));
@@ -71,7 +71,7 @@ void *BE_GL_GetProcAddress(_THIS, const char *proc)
void *location = NULL;
status_t err;
if ((err =
- get_image_symbol((image_id) _this->gl_config.dll_handle,
+ get_image_symbol((image_id)(addr_t) _this->gl_config.dll_handle,
proc, B_SYMBOL_TYPE_ANY,
&location)) == B_OK) {
return location;
--
2.2.2
From 2969992d8368ee4c9661552897fb2d98e4180009 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 3 Sep 2014 19:22:12 +0200
Subject: Fix null pointer dereference.
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index c42a910..4d98641 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -93,7 +93,8 @@ void BE_GL_SwapWindow(_THIS, SDL_Window * window) {
}
int BE_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) {
- _GetBeApp()->SetCurrentContext(((SDL_BWin*)context)->GetGLView());
+ SDL_BWin* win = (SDL_BWin*)context;
+ _GetBeApp()->SetCurrentContext(win ? win->GetGLView() : NULL);
return 0;
}
--
2.2.2
From 7191972735818e39e3c02e1a69ffc88f67a377ab Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 25 Feb 2016 20:23:41 +0000
Subject: remove nacl, missing templates on Haiku
diff --git a/configure.in b/configure.in
index 47186d6..5fcfeec 100644
--- a/configure.in
+++ b/configure.in
@@ -1317,32 +1317,6 @@ AC_HELP_STRING([--enable-mir-shared], [dynamically load Mir support [[default=ma
fi
}
-dnl Check for Native Client stuff
-CheckNativeClient()
-{
- AC_TRY_COMPILE([
- #if !defined(__native_client__)
- #error "NO NACL"
- #endif
- ],[
- ],[
- AC_DEFINE(SDL_VIDEO_DRIVER_NACL)
- AC_DEFINE(SDL_AUDIO_DRIVER_NACL)
- AC_DEFINE(HAVE_POW, 1, [ ])
- AC_DEFINE(HAVE_OPENGLES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
-
- SDL_LIBS="-lppapi_simple -lppapi_gles2 $SDL_LIBS"
-
- SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
- SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
- SUMMARY_audio="${SUMMARY_audio} nacl"
- SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
- SUMMARY_video="${SUMMARY_video} nacl opengles2"
- ])
-}
-
dnl Find the X11 include and library directories
CheckX11()
--
2.2.2
From c69f84542f84c2a40dd811c6524fa862fefff276 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Mon, 11 Jul 2016 15:39:01 +0200
Subject: Try to find correct application signature from app resources
Instead of always hardcoding application/x-SDL-executable.
diff --git a/src/main/haiku/SDL_BeApp.cc b/src/main/haiku/SDL_BeApp.cc
index 36c2a1a..4676c58 100644
--- a/src/main/haiku/SDL_BeApp.cc
+++ b/src/main/haiku/SDL_BeApp.cc
@@ -25,8 +25,10 @@
/* Handle the BeApp specific portions of the application */
#include <AppKit.h>
+#include <storage/AppFileInfo.h>
#include <storage/Path.h>
#include <storage/Entry.h>
+#include <storage/File.h>
#include <unistd.h>
#include "SDL_BApp.h" /* SDL_BApp class definition */
@@ -49,7 +51,24 @@ StartBeApp(void *unused)
{
BApplication *App;
- App = new SDL_BApp("application/x-SDL-executable");
+ // default application signature
+ const char *signature = "application/x-SDL-executable";
+ // dig resources for correct signature
+ image_info info;
+ int32 cookie = 0;
+ if (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
+ BFile f(info.name, O_RDONLY);
+ if (f.InitCheck() == B_OK) {
+ BAppFileInfo app_info(&f);
+ if (app_info.InitCheck() == B_OK) {
+ char sig[B_MIME_TYPE_LENGTH];
+ if (app_info.GetSignature(sig) == B_OK)
+ signature = strndup(sig, B_MIME_TYPE_LENGTH);
+ }
+ }
+ }
+
+ App = new SDL_BApp(signature);
App->Run();
delete App;
--
2.8.0
diff -r fbf9b0e3589a configure
--- a/configure Sat Oct 22 17:53:03 2016 -0700
+++ b/configure Wed Oct 26 20:14:55 2016 +0200
@@ -23490,6 +23490,7 @@
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
+ CheckDLOPEN
CheckHaikuVideo
CheckHaikuGL
CheckPTHREAD
@@ -23518,14 +23519,6 @@
SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c"
have_timers=yes
fi
- # Set up files for the shared object loading library
- if test x$enable_loadso = xyes; then
-
-$as_echo "#define SDL_LOADSO_HAIKU 1" >>confdefs.h
-
- SOURCES="$SOURCES $srcdir/src/loadso/haiku/*.c"
- have_loadso=yes
- fi
# Set up files for the system power library
if test x$enable_power = xyes; then
diff -r fbf9b0e3589a configure.in
--- a/configure.in Sat Oct 22 17:53:03 2016 -0700
+++ b/configure.in Wed Oct 26 20:14:55 2016 +0200
@@ -3229,6 +3229,7 @@
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
+ CheckDLOPEN
CheckHaikuVideo
CheckHaikuGL
CheckPTHREAD
@@ -3251,12 +3252,6 @@
SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c"
have_timers=yes
fi
- # Set up files for the shared object loading library
- if test x$enable_loadso = xyes; then
- AC_DEFINE(SDL_LOADSO_HAIKU, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/loadso/haiku/*.c"
- have_loadso=yes
- fi
# Set up files for the system power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_HAIKU, 1, [ ])
diff -r fbf9b0e3589a src/dynapi/SDL_dynapi.c
--- a/src/dynapi/SDL_dynapi.c Sat Oct 22 17:53:03 2016 -0700
+++ b/src/dynapi/SDL_dynapi.c Wed Oct 26 20:14:55 2016 +0200
@@ -216,21 +216,7 @@
return retval;
}
-#elif defined(__HAIKU__)
-#include <os/kernel/image.h>
-static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
-{
- image_id lib = load_add_on(fname);
- void *retval = NULL;
- if (lib >= 0) {
- if (get_image_symbol(lib, sym, B_SYMBOL_TYPE_TEXT, &retval) != B_NO_ERROR) {
- unload_add_on(lib);
- retval = NULL;
- }
- }
- return retval;
-}
-#elif defined(unix) || defined(__unix__) || defined(__APPLE__)
+#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__)
#include <dlfcn.h>
static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
{

View File

@@ -1,208 +0,0 @@
From 5b995581729cb06e58f1d71cb286135951e5d2a5 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 29 Aug 2014 15:24:11 +0000
Subject: haiku patch
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index 6bf7a17..0b60466 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -54,7 +54,7 @@ int BE_GL_LoadLibrary(_THIS, const char *path)
if( get_image_symbol(info.id, "glBegin", B_SYMBOL_TYPE_ANY,
&location) == B_OK) {
- _this->gl_config.dll_handle = (void *) (size_t) info.id;
+ _this->gl_config.dll_handle = (void *) (addr_t) info.id;
_this->gl_config.driver_loaded = 1;
SDL_strlcpy(_this->gl_config.driver_path, "libGL.so",
SDL_arraysize(_this->gl_config.driver_path));
@@ -69,7 +69,7 @@ void *BE_GL_GetProcAddress(_THIS, const char *proc)
void *location = NULL;
status_t err;
if ((err =
- get_image_symbol((image_id) (size_t) _this->gl_config.dll_handle,
+ get_image_symbol((image_id) (addr_t) _this->gl_config.dll_handle,
proc, B_SYMBOL_TYPE_ANY,
&location)) == B_OK) {
return location;
--
2.15.1
From 6cb2a822e56dcd960dd788b84fd7ea48e67caa2a Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 25 Feb 2016 20:23:41 +0000
Subject: remove nacl, missing templates on Haiku
diff --git a/configure.in b/configure.in
index 5ac2130..fbfe2cc 100644
--- a/configure.in
+++ b/configure.in
@@ -1530,33 +1530,6 @@ AC_HELP_STRING([--enable-mir-shared], [dynamically load Mir support [[default=ma
fi
}
-dnl Check for Native Client stuff
-CheckNativeClient()
-{
- AC_TRY_COMPILE([
- #if !defined(__native_client__)
- #error "NO NACL"
- #endif
- ],[
- ],[
- AC_DEFINE(SDL_VIDEO_DRIVER_NACL, 1, [ ])
- AC_DEFINE(SDL_AUDIO_DRIVER_NACL, 1, [ ])
- AC_DEFINE(HAVE_POW, 1, [ ])
- AC_DEFINE(HAVE_OPENGLES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
-
- SDL_LIBS="-lppapi_simple -lppapi_gles2 $SDL_LIBS"
-
- SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
- SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
- SUMMARY_audio="${SUMMARY_audio} nacl"
- SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
- SUMMARY_video="${SUMMARY_video} nacl opengles2"
- ])
-}
-
-
CheckRPI()
{
AC_ARG_ENABLE(video-rpi,
--
2.15.1
From f289ca347419e84ab5bce1e0f9992ea56289ed57 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 30 Sep 2017 13:36:12 +0200
Subject: fix AC_DEFINE
diff --git a/configure.in b/configure.in
index fbfe2cc..c77e630 100644
--- a/configure.in
+++ b/configure.in
@@ -1829,7 +1829,7 @@ int event_type = XI_TouchBegin;
XITouchClassInfo *t;
],[
have_xinput2_multitouch=yes
- AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [], [Description])
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
])
AC_MSG_RESULT($have_xinput2_multitouch)
--
2.15.1
From 289f0c1f881d64367c560e913f686cf45adaa567 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 2 Feb 2018 09:40:46 +0100
Subject: Fix secondary arch build.
Rather than trying to guess the name of libstdc++, run libtool in C++
mode so it figures this out by itself. The previous way of detecting
libstdc++ would not allow for building a secondary architecture package.
diff --git a/Makefile.in b/Makefile.in
index fe56652..47d9c82 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -143,13 +143,13 @@ update-revision:
.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
$(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS)
- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+ $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CXX --mode=link $(CXX) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir)
+ $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CXX --mode=link $(CXX) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir)
$(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir)
+ $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CXX --mode=link $(CXX) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir)
install: all install-bin install-hdrs install-lib install-data
install-bin:
diff --git a/configure.in b/configure.in
index c77e630..ffb09bb 100644
--- a/configure.in
+++ b/configure.in
@@ -3595,9 +3595,6 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
# The Haiku platform requires special setup.
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
- # Haiku's x86 spins use libstdc++.r4.so (for binary compat?), but
- # other spins, like x86-64, use a more standard "libstdc++.so.*"
- AC_CHECK_FILE("/boot/system/lib/libstdc++.r4.so", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++.r4", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++")
;;
arm*-apple-darwin*|*-ios-*)
ARCH=ios
--
2.15.1
From b15465c0835d6e998b6255a7654d14fb7b8b030d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 2 Feb 2018 10:40:00 +0100
Subject: Fix crash when opening window
- _num_clips was not set in constructor, so a NULL _clips could be
mistakenly dereferenced.
- As _clips is accessible outside the class, it is not a good idea to
free/reallocate it. Try to limit this by reallocating only when it needs to
grow.
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index a20147a..105ebb5 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -86,6 +86,7 @@ class SDL_BWin:public BDirectWindow
_buffer_locker = new BLocker();
_bitmap = NULL;
_clips = NULL;
+ _num_clips = 0;
#ifdef DRAWTHREAD
_draw_thread_id = spawn_thread(BE_DrawThread, "drawing_thread",
@@ -179,13 +180,17 @@ class SDL_BWin:public BDirectWindow
_connected = true;
case B_DIRECT_MODIFY:
- if(_clips) {
- free(_clips);
- _clips = NULL;
+ if (info->clip_list_count > _num_clips)
+ {
+ if(_clips) {
+ free(_clips);
+ _clips = NULL;
+ }
}
_num_clips = info->clip_list_count;
- _clips = (clipping_rect *)malloc(_num_clips*sizeof(clipping_rect));
+ if (_clips == NULL)
+ _clips = (clipping_rect *)malloc(_num_clips*sizeof(clipping_rect));
if(_clips) {
memcpy(_clips, info->clip_list,
_num_clips*sizeof(clipping_rect));
@@ -652,7 +657,7 @@ private:
clipping_rect _bounds;
BLocker *_buffer_locker;
clipping_rect *_clips;
- int32 _num_clips;
+ uint32 _num_clips;
int32 _bytes_per_px;
thread_id _draw_thread_id;
--
2.15.1

View File

@@ -1,14 +1,14 @@
From c486541ecee341dbb6264f884be5b0e410f7fe8d Mon Sep 17 00:00:00 2001
From 9145a1f1a70d80f9cbbf1f905bb4a86696de1e9a Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 29 Aug 2014 15:24:11 +0000
Subject: haiku patch
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index 3456932..d32eb94 100644
index e599062..3b145a3 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -54,7 +54,7 @@ int BE_GL_LoadLibrary(_THIS, const char *path)
@@ -54,7 +54,7 @@ int HAIKU_GL_LoadLibrary(_THIS, const char *path)
if( get_image_symbol(info.id, "glBegin", B_SYMBOL_TYPE_ANY,
&location) == B_OK) {
@@ -17,7 +17,7 @@ index 3456932..d32eb94 100644
_this->gl_config.driver_loaded = 1;
SDL_strlcpy(_this->gl_config.driver_path, "libGL.so",
SDL_arraysize(_this->gl_config.driver_path));
@@ -69,7 +69,7 @@ void *BE_GL_GetProcAddress(_THIS, const char *proc)
@@ -69,7 +69,7 @@ void *HAIKU_GL_GetProcAddress(_THIS, const char *proc)
void *location = NULL;
status_t err;
if ((err =
@@ -30,17 +30,17 @@ index 3456932..d32eb94 100644
2.19.1
From 72eedfc8fb26c9773597636dff9616f9f3326af5 Mon Sep 17 00:00:00 2001
From 313046cb8e582cd1485589302f7f469766592aca Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 25 Feb 2016 20:23:41 +0000
Subject: remove nacl, missing templates on Haiku
diff --git a/configure.in b/configure.in
index 1c7e793..8e3a74b 100644
index ae866ff..57afa1f 100644
--- a/configure.in
+++ b/configure.in
@@ -1538,33 +1538,6 @@ AC_HELP_STRING([--enable-mir-shared], [dynamically load Mir support [[default=ma
@@ -1551,33 +1551,6 @@ AC_HELP_STRING([--enable-mir-shared], [dynamically load Mir support [[default=ma
fi
}
@@ -78,30 +78,30 @@ index 1c7e793..8e3a74b 100644
2.19.1
From 52dc56adba2e1e67eb9518a8479e9afd029c2ef2 Mon Sep 17 00:00:00 2001
From 69d3ffdec32e5fd06126102298d0bdc3c82912f9 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 30 Sep 2017 13:36:12 +0200
Subject: fix AC_DEFINE
diff --git a/configure.in b/configure.in
index 8e3a74b..d4d38e4 100644
index 57afa1f..4c87ce0 100644
--- a/configure.in
+++ b/configure.in
@@ -1841,7 +1841,7 @@ int event_type = XI_TouchBegin;
@@ -1854,7 +1854,7 @@ int event_type = XI_TouchBegin;
XITouchClassInfo *t;
],[
have_xinput2_multitouch=yes
- AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
],[
have_xinput2_multitouch=yes
- AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [], [Description])
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
])
AC_MSG_RESULT($have_xinput2_multitouch)
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
])
AC_MSG_RESULT($have_xinput2_multitouch)
--
2.19.1
From 3b5fe8597182deb812e4302d1734abff36f88859 Mon Sep 17 00:00:00 2001
From 5a8b19e6e594ce29fd579c4554a32f4628ffb7b7 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 2 Feb 2018 09:40:46 +0100
Subject: Fix secondary arch build.
@@ -111,10 +111,10 @@ mode so it figures this out by itself. The previous way of detecting
libstdc++ would not allow for building a secondary architecture package.
diff --git a/Makefile.in b/Makefile.in
index fe56652..47d9c82 100644
index 4eb6e63..85162c6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -143,13 +143,13 @@ update-revision:
@@ -144,13 +144,13 @@ update-revision:
.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
$(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS)
@@ -132,10 +132,10 @@ index fe56652..47d9c82 100644
install: all install-bin install-hdrs install-lib install-data
install-bin:
diff --git a/configure.in b/configure.in
index d4d38e4..7c3a166 100644
index 4c87ce0..7dd7cd8 100644
--- a/configure.in
+++ b/configure.in
@@ -3642,9 +3642,6 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
@@ -3733,9 +3733,6 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
# The Haiku platform requires special setup.
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
@@ -149,7 +149,7 @@ index d4d38e4..7c3a166 100644
2.19.1
From 0574b06e49831f79405e5c587ecdaa37e8ca1294 Mon Sep 17 00:00:00 2001
From b56132ee7db02db18db43eeedc53892cdc89583e Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 2 Feb 2018 10:40:00 +0100
Subject: Fix crash when opening window
@@ -161,7 +161,7 @@ Subject: Fix crash when opening window
grow.
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index 3e61888..bd4aae7 100644
index b22f74b..7cb2de9 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -86,6 +86,7 @@ class SDL_BWin:public BDirectWindow
@@ -171,7 +171,7 @@ index 3e61888..bd4aae7 100644
+ _num_clips = 0;
#ifdef DRAWTHREAD
_draw_thread_id = spawn_thread(BE_DrawThread, "drawing_thread",
_draw_thread_id = spawn_thread(HAIKU_DrawThread, "drawing_thread",
@@ -179,13 +180,17 @@ class SDL_BWin:public BDirectWindow
_connected = true;
@@ -207,14 +207,14 @@ index 3e61888..bd4aae7 100644
2.19.1
From 82d904bd7529bc8c3939fe56695def0cf0ae07fd Mon Sep 17 00:00:00 2001
From e1745294f598df356ba81e4a4471367a7425876a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 15 Sep 2018 23:16:25 +1000
Subject: Add simple relative mode for mouse
diff --git a/src/main/haiku/SDL_BApp.h b/src/main/haiku/SDL_BApp.h
index ba3f927..7d4f442 100644
index 7adbd00..786a57e 100644
--- a/src/main/haiku/SDL_BApp.h
+++ b/src/main/haiku/SDL_BApp.h
@@ -230,6 +230,21 @@ private:
@@ -237,20 +237,20 @@ index ba3f927..7d4f442 100644
+ }
+
/* Tell the application that the mouse passed over, redraw needed */
BE_UpdateWindowFramebuffer(NULL,win,NULL,-1);
HAIKU_UpdateWindowFramebuffer(NULL,win,NULL,-1);
}
--
2.19.1
From 9da93844df18c1a4c64a06fa6a45c873dd41da15 Mon Sep 17 00:00:00 2001
From 9e78031698012e2ef19a1a935972f8048b6297de Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 18 Sep 2018 20:47:07 +1000
Subject: Add support for relative mouse mode
diff --git a/src/main/haiku/SDL_BApp.h b/src/main/haiku/SDL_BApp.h
index 7d4f442..ec0c458 100644
index 786a57e..07f33f6 100644
--- a/src/main/haiku/SDL_BApp.h
+++ b/src/main/haiku/SDL_BApp.h
@@ -228,7 +228,6 @@ private:
@@ -277,7 +277,7 @@ index 7d4f442..ec0c458 100644
be_app->ShowCursor();
}
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index bd4aae7..370bdce 100644
index 7cb2de9..fa945a5 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -319,22 +319,17 @@ class SDL_BWin:public BDirectWindow
@@ -342,14 +342,14 @@ index bd4aae7..370bdce 100644
2.19.1
From 5fa6df3d48437cb765391fae89995e4f2850dacd Mon Sep 17 00:00:00 2001
From 022d289781c1a582ff6a732ce521b741aba62a42 Mon Sep 17 00:00:00 2001
From: Peter Kosyh <p.kosyh@gmail.com>
Date: Sat, 6 Oct 2018 12:48:15 +0300
Subject: haiku: mouse->ShowMouse method added
diff --git a/src/main/haiku/SDL_BApp.h b/src/main/haiku/SDL_BApp.h
index ec0c458..5ff8bf1 100644
index 07f33f6..f86ba9a 100644
--- a/src/main/haiku/SDL_BApp.h
+++ b/src/main/haiku/SDL_BApp.h
@@ -244,7 +244,7 @@ private:
@@ -362,7 +362,7 @@ index ec0c458..5ff8bf1 100644
}
diff --git a/src/video/haiku/SDL_bvideo.cc b/src/video/haiku/SDL_bvideo.cc
index afe20e3..c0b1d30 100644
index e7b4b6e..747f7d4 100644
--- a/src/video/haiku/SDL_bvideo.cc
+++ b/src/video/haiku/SDL_bvideo.cc
@@ -19,6 +19,7 @@
@@ -373,11 +373,11 @@ index afe20e3..c0b1d30 100644
#if SDL_VIDEO_DRIVER_HAIKU
@@ -132,6 +133,33 @@ void BE_DeleteDevice(SDL_VideoDevice * device)
SDL_free(device);
@@ -132,6 +133,33 @@ void HAIKU_DeleteDevice(SDL_VideoDevice * device)
SDL_free(device);
}
+static int BE_ShowCursor(SDL_Cursor *cur)
+static int HAIKU_ShowCursor(SDL_Cursor *cur)
+{
+ SDL_Mouse *mouse = SDL_GetMouse();
+ int show;
@@ -394,39 +394,40 @@ index afe20e3..c0b1d30 100644
+ return 0;
+}
+
+static void BE_MouseInit(_THIS)
+static void HAIKU_MouseInit(_THIS)
+{
+ SDL_Mouse *mouse = SDL_GetMouse();
+ if (!mouse)
+ return;
+ mouse->ShowCursor = BE_ShowCursor;
+ mouse->ShowCursor = HAIKU_ShowCursor;
+ mouse->cur_cursor = (SDL_Cursor*)0x1;
+ mouse->def_cursor = (SDL_Cursor*)0x2;
+}
+
int BE_VideoInit(_THIS)
int HAIKU_VideoInit(_THIS)
{
/* Initialize the Be Application for appserver interaction */
@@ -145,6 +173,7 @@ int BE_VideoInit(_THIS)
/* Init the keymap */
BE_InitOSKeymap();
+ BE_MouseInit(_this);
/* Initialize the Be Application for appserver interaction */
@@ -145,6 +173,8 @@ int HAIKU_VideoInit(_THIS)
/* Init the keymap */
HAIKU_InitOSKeymap();
+ HAIKU_MouseInit(_this);
+
#if SDL_VIDEO_OPENGL
/* testgl application doesn't load library, just tries to load symbols */
/* is it correct? if so we have to load library here */
--
2.19.1
From 0ac7602b3cc4659e491c5e3abab19e0a32b64ccd Mon Sep 17 00:00:00 2001
From b4513263389947c11b17f264a241803e3c5a4a6e Mon Sep 17 00:00:00 2001
From: Peter Kosyh <p.kosyh@gmail.com>
Date: Sat, 6 Oct 2018 13:50:30 +0300
Subject: mouse_relative fix
diff --git a/src/main/haiku/SDL_BApp.h b/src/main/haiku/SDL_BApp.h
index 5ff8bf1..e0a4b9b 100644
index f86ba9a..1e7a8b5 100644
--- a/src/main/haiku/SDL_BApp.h
+++ b/src/main/haiku/SDL_BApp.h
@@ -230,9 +230,7 @@ private:
@@ -444,14 +445,14 @@ index 5ff8bf1..e0a4b9b 100644
2.19.1
From 83745eedc8075c01da46abe7f6b4ab0d066eb7c4 Mon Sep 17 00:00:00 2001
From 72367442fc2d13b6727cadf8d0a7d221a55c49d0 Mon Sep 17 00:00:00 2001
From: Peter Kosyh <p.kosyh@gmail.com>
Date: Sat, 6 Oct 2018 14:28:41 +0300
Subject: mouse wheel y invert
diff --git a/src/main/haiku/SDL_BApp.h b/src/main/haiku/SDL_BApp.h
index e0a4b9b..d59ac34 100644
index 1e7a8b5..3fe4bb0 100644
--- a/src/main/haiku/SDL_BApp.h
+++ b/src/main/haiku/SDL_BApp.h
@@ -277,7 +277,7 @@ private:
@@ -467,14 +468,14 @@ index e0a4b9b..d59ac34 100644
2.19.1
From dfb47d5e5882460d6958e20c9881368200ddbc3f Mon Sep 17 00:00:00 2001
From faefae6437eaa7e9bae17a117d7453126fa1e136 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 5 Nov 2018 23:25:54 +1000
Subject: Disable pointer history
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index 370bdce..7ff8ead 100644
index fa945a5..9bcfa66 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -140,6 +140,7 @@ class SDL_BWin:public BDirectWindow
@@ -489,7 +490,7 @@ index 370bdce..7ff8ead 100644
2.19.1
From dc3469a527fbdb507db7de957100f8aaa845d156 Mon Sep 17 00:00:00 2001
From 3c12c62dbeea984063c2ecb3153dcef3977d1855 Mon Sep 17 00:00:00 2001
From: EXL <exlmotodev@gmail.com>
Date: Wed, 5 Dec 2018 07:02:11 +0000
Subject: Implement message box for Haiku
@@ -503,7 +504,7 @@ Add simple customization support also.
Fix build for x86_gcc2.
diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h
index 8aa4a39..a3f8de6 100644
index f1c4021..384753c 100644
--- a/include/SDL_syswm.h
+++ b/include/SDL_syswm.h
@@ -126,7 +126,8 @@ typedef enum
@@ -517,7 +518,7 @@ index 8aa4a39..a3f8de6 100644
/**
diff --git a/src/main/haiku/SDL_BeApp.cc b/src/main/haiku/SDL_BeApp.cc
index f4ee179..0434494 100644
index cbd2129..5c06744 100644
--- a/src/main/haiku/SDL_BeApp.cc
+++ b/src/main/haiku/SDL_BeApp.cc
@@ -48,13 +48,14 @@ extern "C" {
@@ -532,11 +533,11 @@ index f4ee179..0434494 100644
{
BApplication *App;
- // default application signature
- const char *signature = "application/x-SDL-executable";
// dig resources for correct signature
image_info info;
int32 cookie = 0;
- // default application signature
- const char *signature = "application/x-SDL-executable";
// dig resources for correct signature
image_info info;
int32 cookie = 0;
diff --git a/src/main/haiku/SDL_BeApp.h b/src/main/haiku/SDL_BeApp.h
index 83a2beb..7d5e569 100644
--- a/src/main/haiku/SDL_BeApp.h
@@ -552,10 +553,10 @@ index 83a2beb..7d5e569 100644
#ifdef __cplusplus
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 8cf195d..76e6d4c 100644
index 336fdaa..290cfef 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3741,9 +3741,12 @@ SDL_IsScreenKeyboardShown(SDL_Window *window)
@@ -3818,9 +3818,12 @@ SDL_IsScreenKeyboardShown(SDL_Window *window)
#if SDL_VIDEO_DRIVER_X11
#include "x11/SDL_x11messagebox.h"
#endif
@@ -569,7 +570,7 @@ index 8cf195d..76e6d4c 100644
static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
{
SDL_SysWMinfo info;
@@ -3833,6 +3836,13 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
@@ -3912,6 +3915,13 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
@@ -1066,7 +1067,7 @@ index 0000000..4f35cda
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/video/haiku/SDL_bwindow.cc b/src/video/haiku/SDL_bwindow.cc
index 0931abe..404b16f 100644
index 142a3fa..462608b 100644
--- a/src/video/haiku/SDL_bwindow.cc
+++ b/src/video/haiku/SDL_bwindow.cc
@@ -26,6 +26,8 @@
@@ -1078,11 +1079,11 @@ index 0931abe..404b16f 100644
/* Define a path to window's BWIN data */
#ifdef __cplusplus
extern "C" {
@@ -217,7 +219,15 @@ void BE_DestroyWindow(_THIS, SDL_Window * window) {
SDL_bool BE_GetWindowWMInfo(_THIS, SDL_Window * window,
@@ -217,7 +219,15 @@ void HAIKU_DestroyWindow(_THIS, SDL_Window * window) {
SDL_bool HAIKU_GetWindowWMInfo(_THIS, SDL_Window * window,
struct SDL_SysWMinfo *info) {
/* FIXME: What is the point of this? What information should be included? */
- return SDL_FALSE;
/* FIXME: What is the point of this? What information should be included? */
- return SDL_FALSE;
+ if (info->version.major == SDL_MAJOR_VERSION &&
+ info->version.minor == SDL_MINOR_VERSION) {
+ info->subsystem = SDL_SYSWM_HAIKU;