switching SDL header path

This commit is contained in:
kanjitalk755
2025-04-10 19:35:48 +09:00
parent f0bbcb0c85
commit 12e51383d2
21 changed files with 37 additions and 28 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
#include "video_blit.h"
#if USE_SDL_VIDEO
#include <SDL.h>
#include "my_sdl.h"
#endif
#include <stdio.h>
+4 -7
View File
@@ -19,6 +19,10 @@
*/
#include "sysdeps.h"
#include "my_sdl.h"
#if !SDL_VERSION_ATLEAST(3, 0, 0)
#include "cpu_emulation.h"
#include "main.h"
#include "prefs.h"
@@ -26,13 +30,6 @@
#include "audio.h"
#include "audio_defs.h"
#include <SDL_mutex.h>
#include <SDL_audio.h>
#include <SDL_version.h>
#include <SDL_timer.h>
#if !SDL_VERSION_ATLEAST(3, 0, 0)
#define DEBUG 0
#include "debug.h"
+1 -1
View File
@@ -20,7 +20,7 @@
#include "sysdeps.h"
#include <SDL.h>
#include "my_sdl.h"
#if SDL_VERSION_ATLEAST(3, 0, 0)
#include "cpu_emulation.h"
+1 -1
View File
@@ -23,7 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <SDL.h>
#include "my_sdl.h"
#include "prefs.h"
+1 -1
View File
@@ -42,7 +42,7 @@
#include "sysdeps.h"
#include <SDL.h>
#include "my_sdl.h"
#if SDL_COMPILEDVERSION >= SDL_VERSIONNUM(1, 0, 0) && SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)
#include <SDL_mutex.h>
+1 -1
View File
@@ -41,7 +41,7 @@
#include "sysdeps.h"
#include <SDL.h>
#include "my_sdl.h"
#if SDL_VERSION_ATLEAST(2, 0, 0) && !SDL_VERSION_ATLEAST(3, 0, 0)
#include <SDL_mutex.h>
+1 -1
View File
@@ -41,7 +41,7 @@
#include "sysdeps.h"
#include <SDL.h>
#include "my_sdl.h"
#if SDL_VERSION_ATLEAST(3, 0, 0)
#include <errno.h>
+1 -1
View File
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>
#include "my_sdl.h"
#include "xpram.h"
+2 -1
View File
@@ -335,8 +335,8 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then
if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x3" ]]; then
PKG_CHECK_MODULES([sdl3], [sdl3 >= 3.0], [
CXXFLAGS="$CXXFLAGS $sdl3_CFLAGS"
CXXFLAGS="$CXXFLAGS `echo " $sdl3_CFLAGS" | sed -e 's/\(-I.*include\)/\1\/SDL3/'`"
LIBS="$LIBS $sdl3_LIBS"
AC_DEFINE([USE_SDL3], [1], [Use SDL3])
WANT_SDL_VERSION_MAJOR=3
], [
TEMP_WANT_SDL_VERSION_MAJOR=1
@@ -346,6 +346,7 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then
PKG_CHECK_MODULES([sdl2], [sdl2 >= 2.0], [
CXXFLAGS="$CXXFLAGS $sdl2_CFLAGS"
LIBS="$LIBS $sdl2_LIBS"
AC_DEFINE([USE_SDL2], [1], [Use SDL2])
WANT_SDL_VERSION_MAJOR=2
], [
TEMP_WANT_SDL_VERSION_MAJOR=1
+1 -2
View File
@@ -27,8 +27,7 @@
#include <sstream>
#ifdef USE_SDL
# include <SDL.h>
# include <SDL_main.h>
# include "my_sdl.h"
#if !SDL_VERSION_ATLEAST(3, 0, 0)
#define SDL_PLATFORM_MACOS __MACOSX__
#endif
+1 -1
View File
@@ -38,7 +38,7 @@
#include "g_resource.h"
#if defined(USE_SDL_AUDIO) || defined(USE_SDL_VIDEO)
#include <SDL.h>
#include "my_sdl.h"
#endif
#define DEBUG 0
+2
View File
@@ -563,9 +563,11 @@ if [[ "x$WANT_SDL_VERSION_MAJOR" = "x3" ]]; then
SDL_CFLAGS=`pkg-config sdl3 --cflags`
SDL_CFLAGS="$SDL_CFLAGS `echo " $SDL_CFLAGS" | sed -e 's/\(-I.*include\)/\1\/SDL3/'`"
SDL_LIBS=`pkg-config sdl3 --libs | sed -e 's/-lSDL3/-lSDL3.dll/'`
AC_DEFINE([USE_SDL3], [1], [Use SDL3])
else
SDL_CFLAGS=`sdl2-config --cflags`
SDL_LIBS=`sdl2-config --static-libs`
AC_DEFINE([USE_SDL2], [1], [Use SDL2])
fi
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
+1 -1
View File
@@ -25,7 +25,7 @@
#include <signal.h>
#include <errno.h>
#include <SDL.h>
#include "my_sdl.h"
#include <SDL_mutex.h>
#include <SDL_thread.h>
+1 -1
View File
@@ -49,7 +49,7 @@ static int bincue_core_audio_callback(void);
#endif
#ifdef USE_SDL_AUDIO
#include <SDL.h>
#include "my_sdl.h"
#include <SDL_audio.h>
#endif
+9
View File
@@ -0,0 +1,9 @@
#include "config.h"
#if defined(USE_SDL3)
#include <SDL3/SDL.h>
#elif defined(USE_SDL2)
#include <SDL2/SDL.h>
#else
#include <SDL.h>
#endif
+2 -1
View File
@@ -224,8 +224,8 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then
if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x3" ]]; then
PKG_CHECK_MODULES([sdl3], [sdl3 >= 3.0], [
CXXFLAGS="$CXXFLAGS $sdl3_CFLAGS"
CXXFLAGS="$CXXFLAGS `echo " $sdl3_CFLAGS" | sed -e 's/\(-I.*include\)/\1\/SDL3/'`"
LIBS="$LIBS $sdl3_LIBS"
AC_DEFINE([USE_SDL3], [1], [Use SDL3])
WANT_SDL_VERSION_MAJOR=3
], [
TEMP_WANT_SDL_VERSION_MAJOR=1
@@ -235,6 +235,7 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then
PKG_CHECK_MODULES([sdl2], [sdl2 >= 2.0], [
CXXFLAGS="$CXXFLAGS $sdl2_CFLAGS"
LIBS="$LIBS $sdl2_LIBS"
AC_DEFINE([USE_SDL2], [1], [Use SDL2])
WANT_SDL_VERSION_MAJOR=2
], [
TEMP_WANT_SDL_VERSION_MAJOR=1
+1 -1
View File
@@ -124,7 +124,7 @@
#endif
#ifdef USE_SDL
#include <SDL.h>
#include "my_sdl.h"
#if !SDL_VERSION_ATLEAST(3, 0, 0)
#define SDL_PLATFORM_MACOS __MACOSX__
#endif
+2 -1
View File
@@ -278,11 +278,12 @@ CPUSRCS="$CPUSRCS ../dummy/prefs_dummy.cpp"
dnl We really want SDL for now
if [[ "x$WANT_SDL_VERSION_MAJOR" = "x3" ]]; then
SDL_CFLAGS=`pkg-config sdl3 --cflags`
SDL_CFLAGS="$SDL_CFLAGS `echo " $SDL_CFLAGS" | sed -e 's/\(-I.*include\)/\1\/SDL3/'`"
SDL_LIBS=`pkg-config sdl3 --libs | sed -e 's/-lSDL3/-lSDL3.dll/'`
AC_DEFINE([USE_SDL3], [1], [Use SDL3])
else
SDL_CFLAGS=`sdl2-config --cflags`
SDL_LIBS=`sdl2-config --static-libs`
AC_DEFINE([USE_SDL2], [1], [Use SDL2])
fi
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
+2 -4
View File
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <SDL.h>
#include "my_sdl.h"
#include "sysdeps.h"
#include "main.h"
@@ -821,9 +821,7 @@ void SheepMem::Exit(void)
*/
#ifdef USE_SDL_VIDEO
#if SDL_VERSION_ATLEAST(3, 0, 0)
#include <SDL_video.h>
#else
#if !SDL_VERSION_ATLEAST(3, 0, 0)
#include <SDL_syswm.h>
#endif
extern SDL_Window *sdl_window;
+1
View File
@@ -0,0 +1 @@
../../../BasiliskII/src/include/my_sdl.h
+1 -1
View File
@@ -47,7 +47,7 @@
#endif
#ifdef USE_SDL_VIDEO
#include <SDL_events.h>
#include "my_sdl.h"
#endif
#if ENABLE_MON