summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-scripts/makedep.sh6
-rw-r--r--configure.in2
-rw-r--r--src/thread/pthread/SDL_systhread.c15
-rw-r--r--src/video/riscos/SDL_riscosASM.S (renamed from src/video/riscos/SDL_riscosASM.s)0
4 files changed, 23 insertions, 0 deletions
diff --git a/build-scripts/makedep.sh b/build-scripts/makedep.sh
index f9801fe3..ffea4bd2 100755
--- a/build-scripts/makedep.sh
+++ b/build-scripts/makedep.sh
@@ -69,6 +69,12 @@ __EOF__
__EOF__
;;
+ S) cat >>${output}.new <<__EOF__
+
+ \$(LIBTOOL) --mode=compile \$(CC) -c $src -o \$@
+
+__EOF__
+ ;;
*) echo "Unknown file extension: $ext";;
esac
echo "" >>${output}.new
diff --git a/configure.in b/configure.in
index e5465e10..b6ccb833 100644
--- a/configure.in
+++ b/configure.in
@@ -2325,6 +2325,7 @@ case "$target" in
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS)
SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/riscos/*.S"
have_video=yes
fi
# Set up files for the joystick library
@@ -2388,6 +2389,7 @@ OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.asm,$(objects)/\1.lo,g'`
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'`
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.S,$(objects)/\1.lo,g'`
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.o,g'`
SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.o,g'`
diff --git a/src/thread/pthread/SDL_systhread.c b/src/thread/pthread/SDL_systhread.c
index 61994d3a..e9923fac 100644
--- a/src/thread/pthread/SDL_systhread.c
+++ b/src/thread/pthread/SDL_systhread.c
@@ -34,6 +34,13 @@ static int sig_list[] = {
SIGVTALRM, SIGPROF, 0
};
+#ifdef __RISCOS__
+/* RISC OS needs to know the main thread for
+ * it's timer and event processing. */
+int riscos_using_threads = 0;
+Uint32 riscos_main_thread = 0; /* Thread running events */
+#endif
+
static void *RunThread(void *data)
{
@@ -58,6 +65,14 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
SDL_SetError("Not enough resources to create thread");
return(-1);
}
+
+#ifdef __RISCOS__
+ if (riscos_using_threads == 0) {
+ riscos_using_threads = 1;
+ riscos_main_thread = SDL_ThreadID();
+ }
+#endif
+
return(0);
}
diff --git a/src/video/riscos/SDL_riscosASM.s b/src/video/riscos/SDL_riscosASM.S
index 2de0ceb3..2de0ceb3 100644
--- a/src/video/riscos/SDL_riscosASM.s
+++ b/src/video/riscos/SDL_riscosASM.S