Skip to content

Commit

Permalink
remove source code support for SDL2
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Oct 18, 2024
1 parent caca619 commit 337d8fa
Show file tree
Hide file tree
Showing 38 changed files with 163 additions and 2,421 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,6 @@ target_link_libraries(love_joystick_root PUBLIC
add_library(love_joystick_sdl STATIC
src/modules/joystick/sdl/Joystick.cpp
src/modules/joystick/sdl/Joystick.h
src/modules/joystick/sdl/JoystickSDL3.cpp
src/modules/joystick/sdl/JoystickSDL3.h
src/modules/joystick/sdl/JoystickModule.cpp
src/modules/joystick/sdl/JoystickModule.h
)
Expand Down Expand Up @@ -1982,7 +1980,7 @@ love_group_projects(NAME "liblove" NESTED TARGETS ${LIBLOVE_DEPENDENCIES})
love_group_projects(NAME "liblove/libraries" NESTED TARGETS ${LIBLOVE_LIBRARIES})
love_group_projects(NAME "liblove" TARGETS liblove ${LOVE_EXTRA_DEPENDECIES})

love_group_projects(NAME "lovedep" TARGETS lovedep::SDL2 lovedep::Freetype lovedep::Harfbuzz lovedep::OpenAL lovedep::Modplug lovedep::Theora lovedep::Vorbis lovedep::Ogg lovedep::Zlib lovedep::Lua)
love_group_projects(NAME "lovedep" TARGETS lovedep::SDL lovedep::Freetype lovedep::Harfbuzz lovedep::OpenAL lovedep::Modplug lovedep::Theora lovedep::Vorbis lovedep::Ogg lovedep::Zlib lovedep::Lua)
love_group_projects(NAME "lovedep" TARGETS lua51 alcommon al-excommon harfbuzz-subset zlib)


Expand Down
12 changes: 0 additions & 12 deletions src/common/android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@
#include <set>
#include <unordered_map>

#if __has_include(<SDL3/SDL.h>)
#include <SDL3/SDL.h>
#else
#include <SDL.h>
#endif

#include <jni.h>
#include <android/asset_manager.h>
Expand All @@ -44,14 +40,6 @@
#include "libraries/physfs/physfs.h"
#include "filesystem/physfs/PhysfsIo.h"

// Backward compatibility
#if !SDL_VERSION_ATLEAST(3, 0, 0)
#define SDL_GetAndroidJNIEnv SDL_AndroidGetJNIEnv
#define SDL_GetAndroidActivity SDL_AndroidGetActivity
#define SDL_GetAndroidInternalStoragePath SDL_AndroidGetInternalStoragePath
#define SDL_GetAndroidExternalStoragePath SDL_AndroidGetExternalStoragePath
#endif

namespace love
{
namespace android
Expand Down
4 changes: 0 additions & 4 deletions src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@
# define LOVE_LEGENDARY_APP_ARGV_HACK
#endif

#if defined(LOVE_ANDROID) || defined(LOVE_IOS)
# define LOVE_LEGENDARY_ACCELEROMETER_AS_JOYSTICK_HACK
#endif

#if defined(LOVE_WINDOWS) || defined(LOVE_LINUX) || defined(LOVE_ANDROID)
# define LOVE_GRAPHICS_VULKAN
#endif
Expand Down
6 changes: 0 additions & 6 deletions src/common/delay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@

#include "delay.h"

#if __has_include(<SDL3/SDL_timer.h>)
#include <SDL3/SDL_timer.h>
#include <SDL3/SDL_version.h>
#else
#include <SDL_timer.h>
#include <SDL_version.h>
#endif

namespace love
{
Expand Down
6 changes: 0 additions & 6 deletions src/love.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,11 @@
#include "common/Variant.h"
#include "modules/love/love.h"

#if __has_include(<SDL3/SDL.h>)
#include <SDL3/SDL.h>
#else
#include <SDL.h>
#endif

#ifdef LOVE_BUILD_EXE

#if SDL_VERSION_ATLEAST(3, 0, 0)
#include <SDL3/SDL_main.h>
#endif

// Lua
extern "C" {
Expand Down
Loading

0 comments on commit 337d8fa

Please sign in to comment.