Skip to content

Commit

Permalink
configuratble to replace dreamcast timer with unix timers
Browse files Browse the repository at this point in the history
  • Loading branch information
GPF committed Sep 26, 2024
1 parent 61ba15d commit ba6fd40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
19 changes: 16 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2695,9 +2695,22 @@ endif()

if(SDL_TIMERS)
set(SDL_TIMER_DREAMCAST 1)
file(GLOB DREAMCAST_TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/dreamcast/*.c)
list(APPEND SOURCE_FILES ${DREAMCAST_TIMER_SOURCES})
set(HAVE_SDL_TIMERS TRUE)
if(SDL_TIMER_UNIX)
set(SDL_TIMER_UNIX 1)
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
list(APPEND SOURCE_FILES ${TIMER_SOURCES})
set(SDL_TIMER_DREAMCAST 0)
set(HAVE_SDL_TIMERS TRUE)

if(SDL_CLOCK_GETTIME)
set(HAVE_CLOCK_GETTIME 1)
endif()
endif()
if(SDL_TIMER_DREAMCAST)
file(GLOB DREAMCAST_TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/dreamcast/*.c)
list(APPEND SOURCE_FILES ${DREAMCAST_TIMER_SOURCES})
set(HAVE_SDL_TIMERS TRUE)
endif()
endif()

if(SDL_SENSOR)
Expand Down
3 changes: 2 additions & 1 deletion include/SDL_config_dreamcast.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
#define SDL_PTHREADS 1

/* Enable the DREAMCAST timer support (src/timer/dreamcast/\*.c) */
#define SDL_TIMER_DREAMCAST 1
#define SDL_TIMER_DREAMCAST 0
#define SDL_TIMER_UNIX 1

/* Enable the DREAMCAST video driver (src/video/dreamcast/\*.c) */
#define SDL_VIDEO_DRIVER_DREAMCAST 1
Expand Down

0 comments on commit ba6fd40

Please sign in to comment.