Skip to content

Commit

Permalink
./dreamcast build script now installs include/SDL2 files and libs to …
Browse files Browse the repository at this point in the history
…$(KOS_BASE}/addons
  • Loading branch information
GPF committed Sep 16, 2024
1 parent 672fbc0 commit 61ba15d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
9 changes: 8 additions & 1 deletion build-scripts/dreamcast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ case $1 in
--disable-pthreads) ENABLE_PTHREADS=OFF ;;
clean)
echo "Cleaning build directory..."
cd "$BUILD_DIR"
make clean
rm -rf CMakeFiles CMakeCache.txt Makefile
exit 0
;;
distclean)
echo "Removing build directory..."
cd "$BUILD_DIR"
make uninstall
rm -rf "$BUILD_DIR"
exit 0
;;
Expand Down Expand Up @@ -59,9 +63,12 @@ fi
cmake -DCMAKE_TOOLCHAIN_FILE="$KOS_CMAKE_TOOLCHAIN" \
-G "Unix Makefiles" \
$CMAKE_OPTS \
-DCMAKE_INSTALL_PREFIX=${KOS_BASE}/addons \
-DCMAKE_INSTALL_LIBDIR=lib/dreamcast \
-DCMAKE_INSTALL_INCLUDEDIR=include/ \
"$SOURCE_DIR"
# Build the project
make
make install

# Optional: Run tests or other commands here
# Print a message indicating the build is complete
Expand Down
5 changes: 4 additions & 1 deletion src/thread/pthread/SDL_systhread.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@
#endif
#endif

#ifdef __DREAMCAST__)
#if defined (__DREAMCAST__)
int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param);
int pthread_setschedparam(pthread_t thread, int policy, struct sched_param *param);
// int sched_get_priority_min();
// int sched_get_priority_max();
// int pthread_sigmask (int, const sigset_t *, sigset_t *);
#endif

#include "SDL_thread.h"
Expand Down
25 changes: 22 additions & 3 deletions src/video/dreamcast/SDL_dreamcastevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,33 @@
/* Being a null driver, there's no event stream. We just define stubs for
most of the API. */

#include "../../events/SDL_events_c.h"

#include "SDL_dreamcastevents_c.h"
#include <dc/maple.h>
#include <dc/maple/mouse.h>
#include <dc/maple/keyboard.h>
#include <stdio.h>
#include <arch/arch.h>
#include <arch/timer.h>
#include <arch/irq.h>
#include "SDL_dreamcastvideo.h"
#include "SDL_dreamcastevents_c.h"
#define MIN_FRAME_UPDATE 16

static __inline__ Uint32 myGetTicks(void)
{
return ((timer_us_gettime64()>>10));
}

void DREAMCAST_PumpEvents(_THIS)
{
/* do nothing. */
// static Uint32 last_time=0;
// Uint32 now=myGetTicks();
// if (now-last_time>MIN_FRAME_UPDATE)
// {
// keyboard_update();
// mouse_update();
// last_time=now;
// }
}

#endif /* SDL_VIDEO_DRIVER_DREAMCAST */
Expand Down

0 comments on commit 61ba15d

Please sign in to comment.