mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
binding-mri changes for SDL3
This commit is contained in:
parent
ceceda1f04
commit
197d7324be
7 changed files with 30 additions and 25 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -52,3 +52,4 @@ package/
|
|||
oclint/
|
||||
|
||||
steamworks/
|
||||
build/
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
Project(oneshot)
|
||||
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup(TARGETS)
|
||||
|
||||
## Setup options ##
|
||||
|
||||
option(STEAM "Build for Steam" OFF)
|
||||
|
|
@ -287,20 +284,28 @@ add_executable(${PROJECT_NAME} MACOSX_BUNDLE WIN32
|
|||
${EMBEDDED_SOURCE}
|
||||
)
|
||||
|
||||
find_package(SDL3)
|
||||
find_package(SDL3_image)
|
||||
find_package(SDL3_sound)
|
||||
find_package(SDL3_ttf)
|
||||
find_package(OpenAL)
|
||||
find_package(Boost REQUIRED)
|
||||
find_package(PhysFS)
|
||||
find_path(PIXMAN_INCLUDE_DIR NAMES pixman.h PATH_SUFFIXES pixman-1)
|
||||
find_library(PIXMAN_LIBRARY NAMES pixman-1 pixman-1_static pixman-1_staticd)
|
||||
find_package(Ruby 3.3)
|
||||
pkg_check_modules(SIGC2 REQUIRED sigc++-2.0)
|
||||
find_package_handle_standard_args(pixman-1 DEFAULT_MSG PIXMAN_LIBRARY PIXMAN_INCLUDE_DIR)
|
||||
if(PIXMAN-1_FOUND)
|
||||
set(PIXMAN_LIBRARIES ${PIXMAN_LIBRARY})
|
||||
set(PIXMAN_INCLUDE_DIRS ${PIXMAN_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(PIXMAN_INCLUDE_DIR PIXMAN_LIBRARY)
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFINES})
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE src)
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
CONAN_PKG::boost
|
||||
CONAN_PKG::openal
|
||||
CONAN_PKG::physfs
|
||||
CONAN_PKG::pixman
|
||||
CONAN_PKG::ruby
|
||||
CONAN_PKG::sdl2
|
||||
CONAN_PKG::sdl2_image
|
||||
CONAN_PKG::sdl2_ttf
|
||||
CONAN_PKG::sdl_sound-mkxp
|
||||
CONAN_PKG::sigc++
|
||||
${PLATFORM_LIBRARIES})
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE src ${PIXMAN_INCLUDE_DIRS} ${SIGC2_INCLUDE_DIRS})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE SDL3::SDL3 SDL3_image::SDL3_image SDL3_sound::SDL3_sound SDL3_ttf::SDL3_ttf Boost::boost OpenAL::OpenAL physfs ${PIXMAN_LIBRARIES} ${SIGC2_INCLUDE_DIRS} ${PLATFORM_LIBRARIES})
|
||||
|
||||
IF(APPLE)
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND cmake -P "${CMAKE_SOURCE_DIR}/patches/mac/CompleteBundle.cmake" VERBATIM)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
#include <string>
|
||||
#include <zlib.h>
|
||||
|
||||
#include <SDL_filesystem.h>
|
||||
#include <SDL3/SDL_filesystem.h>
|
||||
|
||||
extern const char module_rpg1[];
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@
|
|||
#include <string>
|
||||
#endif
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#define BUFFER_SIZE 256
|
||||
|
||||
static SDL_Thread *thread = NULL;
|
||||
static SDL_mutex *mutex = NULL;
|
||||
static SDL_Mutex *mutex = NULL;
|
||||
static volatile char lang_buffer[BUFFER_SIZE];
|
||||
static volatile char message_buffer[BUFFER_SIZE];
|
||||
static volatile bool active = false;
|
||||
|
|
|
|||
|
|
@ -28,9 +28,8 @@
|
|||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL3/SDL.h>
|
||||
namespace syswm {
|
||||
#include <SDL_syswm.h>
|
||||
}
|
||||
|
||||
#define NIKO_X (320 - 16)
|
||||
|
|
@ -39,7 +38,7 @@ namespace syswm {
|
|||
#define BUFFER_SIZE 256
|
||||
|
||||
static SDL_Thread *thread = NULL;
|
||||
static SDL_mutex *mutex = NULL;
|
||||
static SDL_Mutex *mutex = NULL;
|
||||
static volatile char message_buffer[BUFFER_SIZE];
|
||||
static volatile bool active = false;
|
||||
static volatile int message_len = 0;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "binding-types.h"
|
||||
#include "eventthread.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL3/SDL.h>
|
||||
#include <boost/crc.hpp>
|
||||
|
||||
RB_METHOD(oneshotSetYesNo)
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class Window_Settings
|
|||
tr('Frameskip'),
|
||||
tr('In-Game Timer'),
|
||||
tr('Language'),
|
||||
tr('Debug mode(DEVELOPERS ONLY!)'),
|
||||
tr('Debug mode(DEVS ONLY!)'),
|
||||
tr('Configure Controls (Press F1)'),
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue