forked from etc/pineapple-src
early-access version 2325
This commit is contained in:
parent
66c22ff5a2
commit
cdbc28f0d4
74 changed files with 7922 additions and 5076 deletions
|
@ -1,7 +1,7 @@
|
|||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 2324.
|
||||
This is the source code for early-access 2325.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
|
7
externals/CMakeLists.txt
vendored
7
externals/CMakeLists.txt
vendored
|
@ -52,11 +52,12 @@ endif()
|
|||
# SDL2
|
||||
if (YUZU_USE_EXTERNAL_SDL2)
|
||||
if (NOT WIN32)
|
||||
# Yuzu itself needs: Events Joystick Haptic Sensor Timers Audio
|
||||
# Yuzu itself needs: Atomic Audio Events Joystick Haptic Sensor Threads Timers
|
||||
# Since 2.0.18 Atomic+Threads required for HIDAPI/libusb (see https://github.com/libsdl-org/SDL/issues/5095)
|
||||
# Yuzu-cmd also needs: Video (depends on Loadso/Dlopen)
|
||||
set(SDL_UNUSED_SUBSYSTEMS
|
||||
Atomic Render Power Threads
|
||||
File CPUinfo Filesystem Locale)
|
||||
CPUinfo File Filesystem
|
||||
Locale Power Render)
|
||||
foreach(_SUB ${SDL_UNUSED_SUBSYSTEMS})
|
||||
string(TOUPPER ${_SUB} _OPT)
|
||||
option(SDL_${_OPT} "" OFF)
|
||||
|
|
18
externals/SDL/.github/workflows/psp.yaml
vendored
Executable file
18
externals/SDL/.github/workflows/psp.yaml
vendored
Executable file
|
@ -0,0 +1,18 @@
|
|||
name: Build (Sony Playstation Portable)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
psp:
|
||||
runs-on: ubuntu-latest
|
||||
container: pspdev/pspdev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake gmp mpc1 mpfr4 make
|
||||
- name: Configure CMake
|
||||
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake
|
||||
- name: Build
|
||||
run: cmake --build build
|
77
externals/SDL/CMakeLists.txt
vendored
77
externals/SDL/CMakeLists.txt
vendored
|
@ -61,9 +61,9 @@ include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
|
|||
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
|
||||
set(SDL_MAJOR_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 0)
|
||||
set(SDL_MICRO_VERSION 18)
|
||||
set(SDL_INTERFACE_AGE 0)
|
||||
set(SDL_BINARY_AGE 18)
|
||||
set(SDL_MICRO_VERSION 19)
|
||||
set(SDL_INTERFACE_AGE 1)
|
||||
set(SDL_BINARY_AGE 19)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
# the following should match the versions in Xcode project file:
|
||||
set(DYLIB_CURRENT_VERSION 19.0.0)
|
||||
|
@ -224,7 +224,7 @@ if(APPLE OR ARCH_64 OR MSVC_CLANG)
|
|||
set(OPT_DEF_SSEMATH ON)
|
||||
endif()
|
||||
endif()
|
||||
if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA)
|
||||
if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP)
|
||||
set(OPT_DEF_LIBC ON)
|
||||
endif()
|
||||
|
||||
|
@ -328,7 +328,7 @@ if(EMSCRIPTEN)
|
|||
set(SDL_CPUINFO_ENABLED_BY_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
if(VITA)
|
||||
if(VITA OR PSP)
|
||||
set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
|
||||
set(SDL_LOADSO_ENABLED_BY_DEFAULT OFF)
|
||||
endif()
|
||||
|
@ -914,12 +914,14 @@ if(SDL_LIBC)
|
|||
endif()
|
||||
|
||||
check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
|
||||
check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)
|
||||
if(HAVE_BUILTIN_ICONV)
|
||||
set(HAVE_ICONV 1)
|
||||
elseif(HAVE_LIBICONV)
|
||||
if(HAVE_LIBICONV)
|
||||
list(APPEND EXTRA_LIBS iconv)
|
||||
set(HAVE_ICONV 1)
|
||||
else()
|
||||
check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)
|
||||
if(HAVE_BUILTIN_ICONV)
|
||||
set(HAVE_ICONV 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
|
@ -2199,6 +2201,7 @@ elseif(RISCOS)
|
|||
if(SDL_AUDIO)
|
||||
CheckOSS()
|
||||
endif()
|
||||
|
||||
elseif(VITA)
|
||||
# SDL_spinlock.c Needs to be compiled in ARM mode.
|
||||
check_c_compiler_flag(-marm HAVE_ARM_MODE)
|
||||
|
@ -2279,7 +2282,6 @@ elseif(VITA)
|
|||
|
||||
if(VIDEO_VITA_PVR)
|
||||
check_include_file(gpu_es4/psp2_pvr_hint.h HAVE_PVR_H)
|
||||
|
||||
if(HAVE_PVR_H)
|
||||
target_compile_definitions(sdl-build-options INTERFACE "-D__psp2__")
|
||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||
|
@ -2328,7 +2330,6 @@ elseif(VITA)
|
|||
taihen_stub
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
set(HAVE_ARMSIMD TRUE)
|
||||
|
@ -2352,6 +2353,60 @@ elseif(VITA)
|
|||
|
||||
# CheckPTHREAD()
|
||||
|
||||
elseif(PSP)
|
||||
file(GLOB PSP_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/psp/*.c)
|
||||
set(SDLMAIN_SOURCES ${SDLMAIN_SOURCES} ${PSP_MAIN_SOURCES})
|
||||
|
||||
if(SDL_AUDIO)
|
||||
set(SDL_AUDIO_DRIVER_PSP 1)
|
||||
file(GLOB PSP_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/psp/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${PSP_AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
if(SDL_JOYSTICK)
|
||||
set(SDL_JOYSTICK_PSP 1)
|
||||
file(GLOB PSP_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/psp/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${PSP_JOYSTICK_SOURCES})
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
endif()
|
||||
if(SDL_POWER)
|
||||
set(SDL_POWER_PSP 1)
|
||||
file(GLOB PSP_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/psp/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${PSP_POWER_SOURCES})
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
endif()
|
||||
if(SDL_THREADS)
|
||||
set(SDL_THREAD_PSP 1)
|
||||
file(GLOB PSP_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL2_SOURCE_DIR}/src/thread/psp/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${PSP_THREAD_SOURCES})
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
if(SDL_TIMERS)
|
||||
set(SDL_TIMER_PSP 1)
|
||||
file(GLOB PSP_TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/psp/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${PSP_TIMER_SOURCES})
|
||||
set(HAVE_SDL_TIMERS TRUE)
|
||||
endif()
|
||||
if(SDL_VIDEO)
|
||||
set(SDL_VIDEO_DRIVER_PSP 1)
|
||||
set(SDL_VIDEO_RENDER_PSP 1)
|
||||
file(GLOB PSP_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/psp/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${PSP_VIDEO_SOURCES})
|
||||
set(SDL_VIDEO_OPENGL 1)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
endif()
|
||||
|
||||
list(APPEND EXTRA_LIBS
|
||||
pspctrl
|
||||
psphprm
|
||||
pspge
|
||||
pspgu
|
||||
pspdisplay
|
||||
pspvfpu
|
||||
pspaudio
|
||||
pspvram
|
||||
GL
|
||||
)
|
||||
endif()
|
||||
|
||||
if(SDL_VULKAN AND NOT SDL_LOADSO)
|
||||
|
|
37
externals/SDL/Makefile.os2
vendored
37
externals/SDL/Makefile.os2
vendored
|
@ -1,10 +1,17 @@
|
|||
# Open Watcom makefile to build SDL2.dll for OS/2
|
||||
# wmake -f Makefile.os2
|
||||
#
|
||||
# If you have GNU libiconv installed (iconv2.dll), you
|
||||
# can compile against it by specifying LIBICONV=1, e.g.:
|
||||
# wmake -f Makefile.os2 LIBICONV=1
|
||||
|
||||
LIBNAME = SDL2
|
||||
VERSION = 2.0.18
|
||||
VERSION = 2.0.19
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
LIBICONV=0
|
||||
ICONVLIB=$(LIBICONV_LIB)
|
||||
|
||||
LIBHOME = .
|
||||
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
|
||||
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
|
||||
|
@ -12,11 +19,9 @@ LNKFILE = $(LIBNAME).lnk
|
|||
|
||||
INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
|
||||
INCPATH+= -Iinclude
|
||||
INCPATH+= -I"src/core/os2" -I"src/core/os2/geniconv"
|
||||
|
||||
LIBM = libm.lib
|
||||
LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
|
||||
|
||||
LIBM = SDL2libm.lib
|
||||
LIBS = mmpm2.lib $(LIBM)
|
||||
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
|
||||
# max warnings:
|
||||
CFLAGS+= -wx
|
||||
|
@ -24,6 +29,14 @@ CFLAGS+= -wx
|
|||
CFLAGS+= -wcd=303
|
||||
# building dll:
|
||||
CFLAGS+= -bd
|
||||
# iconv:
|
||||
LIBICONV_LIB=iconv2.lib
|
||||
!ifeq LIBICONV 1
|
||||
CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1
|
||||
LIBS+= $(ICONVLIB)
|
||||
!else
|
||||
LIBS+= libuls.lib libconv.lib
|
||||
!endif
|
||||
# the include paths :
|
||||
CFLAGS+= $(INCPATH)
|
||||
# building SDL itself (for DECLSPEC):
|
||||
|
@ -68,7 +81,10 @@ SRCS+= SDL_dummysensor.c
|
|||
SRCS+= SDL_locale.c SDL_syslocale.c
|
||||
SRCS+= SDL_url.c SDL_sysurl.c
|
||||
|
||||
SRCS+= SDL_os2.c geniconv.c os2cp.c os2iconv.c sys2utf8.c
|
||||
SRCS+= SDL_os2.c
|
||||
!ifeq LIBICONV 0
|
||||
SRCS+= geniconv.c os2cp.c os2iconv.c sys2utf8.c
|
||||
!endif
|
||||
SRCS+= SDL_os2audio.c
|
||||
SRCS+= SDL_os2video.c SDL_os2util.c SDL_os2dive.c SDL_os2vman.c &
|
||||
SDL_os2mouse.c SDL_os2messagebox.c
|
||||
|
@ -83,12 +99,13 @@ MOBJS= $(MSRCS:.c=.obj)
|
|||
|
||||
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
|
||||
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
|
||||
.c: ./src/core/os2;./src/core/os2/geniconv;./src/audio/os2;./src/loadso/os2;./src/filesystem/os2;./src/joystick/os2;./src/thread/os2;./src/timer/os2;./src/video/os2;
|
||||
.c: ./src/core/os2;./src/audio/os2;./src/loadso/os2;./src/filesystem/os2;./src/joystick/os2;./src/thread/os2;./src/timer/os2;./src/video/os2;
|
||||
.c: ./src/core/os2/geniconv;
|
||||
.c: ./src/locale/;./src/locale/unix;./src/misc;./src/misc/dummy;./src/joystick/hidapi;./src/hidapi
|
||||
|
||||
all: $(DLLFILE) $(LIBFILE) .symbolic
|
||||
|
||||
$(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE)
|
||||
$(DLLFILE): $(OBJS) $(LIBM) $(LIBICONV_LIB) $(LNKFILE)
|
||||
@echo * Linking: $@
|
||||
wlink @$(LNKFILE)
|
||||
|
||||
|
@ -131,6 +148,9 @@ SDL_hidapi.obj: SDL_hidapi.c
|
|||
$(LIBM): $(MOBJS)
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
|
||||
|
||||
$(LIBICONV_LIB): "src/core/os2/iconv2.lbc"
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ @$<
|
||||
|
||||
$(LNKFILE):
|
||||
@echo * Creating linker file: $@
|
||||
@%create $@
|
||||
|
@ -153,6 +173,7 @@ clean: .SYMBOLIC
|
|||
@if exist *.err rm *.err
|
||||
@if exist $(LNKFILE) rm $(LNKFILE)
|
||||
@if exist $(LIBM) rm $(LIBM)
|
||||
@if exist $(LIBICONV_LIB) rm $(LIBICONV_LIB)
|
||||
|
||||
distclean: .SYMBOLIC clean
|
||||
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
|
||||
|
|
7
externals/SDL/Makefile.psp
vendored
7
externals/SDL/Makefile.psp
vendored
|
@ -1,4 +1,5 @@
|
|||
TARGET_LIB = libSDL2.a
|
||||
EXTRA_TARGETS = libSDL2main.a
|
||||
OBJS= src/SDL.o \
|
||||
src/SDL_assert.o \
|
||||
src/SDL_dataqueue.o \
|
||||
|
@ -92,6 +93,9 @@ OBJS= src/SDL.o \
|
|||
src/video/psp/SDL_pspmouse.o \
|
||||
src/video/yuv2rgb/yuv_rgb.o
|
||||
|
||||
SDLMAIN_OBJ = src/main/psp/SDL_psp_main.o
|
||||
EXTRA_CLEAN = $(SDLMAIN_OBJ)
|
||||
|
||||
INCDIR = ./include
|
||||
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL
|
||||
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
|
||||
|
@ -105,3 +109,6 @@ LIBS = -lGL -lGLU -lglut -lz \
|
|||
PSPSDK=$(shell psp-config --pspsdk-path)
|
||||
include $(PSPSDK)/lib/build.mak
|
||||
|
||||
libSDL2main.a: $(SDLMAIN_OBJ)
|
||||
$(AR) cru $@ $^
|
||||
$(RANLIB) $@
|
||||
|
|
1
externals/SDL/WhatsNew.txt
vendored
1
externals/SDL/WhatsNew.txt
vendored
|
@ -8,6 +8,7 @@ This is a list of major changes in SDL's version history.
|
|||
General:
|
||||
* The SDL wiki documentation and development headers are automatically kept in sync
|
||||
* Each function has information about in which version of SDL it was introduced
|
||||
* SDL-specific CMake options are now prefixed with 'SDL_'. Be sure to update your CMake build scripts accordingly!
|
||||
* Added the hint SDL_HINT_APP_NAME to let SDL know the name of your application for various places it might show up in system information
|
||||
* Added SDL_RenderGeometry() and SDL_RenderGeometryRaw() to allow rendering of arbitrary shapes using the SDL 2D render API
|
||||
* Added SDL_SetTextureUserData() and SDL_GetTextureUserData() to associate application data with an SDL texture
|
||||
|
|
4
externals/SDL/Xcode/SDL/Info-Framework.plist
vendored
4
externals/SDL/Xcode/SDL/Info-Framework.plist
vendored
|
@ -19,10 +19,10 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.18</string>
|
||||
<string>2.0.19</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.18</string>
|
||||
<string>2.0.19</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -3493,8 +3493,6 @@
|
|||
F3ADAB912576F0B400A6B1D9 /* SDL_sysurl.m in Sources */ = {isa = PBXBuildFile; fileRef = F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */; };
|
||||
F3ADAB922576F0B400A6B1D9 /* SDL_sysurl.m in Sources */ = {isa = PBXBuildFile; fileRef = F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */; };
|
||||
F3ADAB932576F0B400A6B1D9 /* SDL_sysurl.m in Sources */ = {isa = PBXBuildFile; fileRef = F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */; };
|
||||
F3CB963A26B5E10A00B9C980 /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5B023E2513D00DCD162 /* SDL_uikit_main.c */; };
|
||||
F3CB963B26B5E14400B9C980 /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5B023E2513D00DCD162 /* SDL_uikit_main.c */; };
|
||||
F3F07D5A269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
|
||||
F3F07D5B269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
|
||||
F3F07D5C269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
|
||||
|
@ -4006,8 +4004,6 @@
|
|||
F3984CCF25BCC92800374F43 /* SDL_hidapi_stadia.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_stadia.c; sourceTree = "<group>"; };
|
||||
F3A4909D2554D38500E92A8B /* SDL_hidapi_ps5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps5.c; sourceTree = "<group>"; };
|
||||
F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_sysurl.m; sourceTree = "<group>"; };
|
||||
F3CB94BA26B5E0A400B9C980 /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F3CB963826B5E0A600B9C980 /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F3F07D59269640160074468B /* SDL_hidapi_luna.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_luna.c; sourceTree = "<group>"; };
|
||||
F59C710300D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
|
||||
F59C710600D5CB5801000001 /* SDL.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SDL.info; sourceTree = "<group>"; };
|
||||
|
@ -4160,20 +4156,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
F3CB94B526B5E0A400B9C980 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
F3CB963326B5E0A600B9C980 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
|
@ -4265,8 +4247,6 @@
|
|||
A769B23D23E259AE00872273 /* libSDL2.a */,
|
||||
A75FCEB323E25AB700529352 /* libSDL2.dylib */,
|
||||
A75FD06C23E25AC700529352 /* libSDL2.dylib */,
|
||||
F3CB94BA26B5E0A400B9C980 /* libSDLmain.a */,
|
||||
F3CB963826B5E0A600B9C980 /* libSDLmain.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -7089,20 +7069,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
F3CB933F26B5E0A400B9C980 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
F3CB94BD26B5E0A600B9C980 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
|
@ -7306,46 +7272,6 @@
|
|||
productReference = DB31407717554B71006C0E22 /* libSDL2.dylib */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
F3CB933E26B5E0A400B9C980 /* SDLmain-iOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = F3CB94B726B5E0A400B9C980 /* Build configuration list for PBXNativeTarget "SDLmain-iOS" */;
|
||||
buildPhases = (
|
||||
F3CB933F26B5E0A400B9C980 /* Headers */,
|
||||
F3CB93F026B5E0A400B9C980 /* Sources */,
|
||||
F3CB94B526B5E0A400B9C980 /* Frameworks */,
|
||||
F3CB94B626B5E0A400B9C980 /* Rez */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
comments = "This produces libSDLmain.a, which provides a main() for use with your application";
|
||||
dependencies = (
|
||||
);
|
||||
name = "SDLmain-iOS";
|
||||
productInstallPath = /usr/local/lib;
|
||||
productName = "Static Library";
|
||||
productReference = F3CB94BA26B5E0A400B9C980 /* libSDLmain.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
F3CB94BC26B5E0A600B9C980 /* SDLmain-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = F3CB963526B5E0A600B9C980 /* Build configuration list for PBXNativeTarget "SDLmain-tvOS" */;
|
||||
buildPhases = (
|
||||
F3CB94BD26B5E0A600B9C980 /* Headers */,
|
||||
F3CB956E26B5E0A600B9C980 /* Sources */,
|
||||
F3CB963326B5E0A600B9C980 /* Frameworks */,
|
||||
F3CB963426B5E0A600B9C980 /* Rez */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
comments = "This produces libSDLmain.a, which provides a main() for use with your application";
|
||||
dependencies = (
|
||||
);
|
||||
name = "SDLmain-tvOS";
|
||||
productInstallPath = /usr/local/lib;
|
||||
productName = "Static Library";
|
||||
productReference = F3CB963826B5E0A600B9C980 /* libSDLmain.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
|
@ -7368,8 +7294,6 @@
|
|||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
F3CB933E26B5E0A400B9C980 /* SDLmain-iOS */,
|
||||
F3CB94BC26B5E0A600B9C980 /* SDLmain-tvOS */,
|
||||
BECDF5FE0761BA81005FE872 /* Framework */,
|
||||
A7D88A1423E2437C00DCD162 /* Framework-iOS */,
|
||||
A7D88BC923E24BED00DCD162 /* Framework-tvOS */,
|
||||
|
@ -7457,20 +7381,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
F3CB94B626B5E0A400B9C980 /* Rez */ = {
|
||||
isa = PBXRezBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
F3CB963426B5E0A600B9C980 /* Rez */ = {
|
||||
isa = PBXRezBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXRezBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
|
@ -9165,22 +9075,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
F3CB93F026B5E0A400B9C980 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F3CB963A26B5E10A00B9C980 /* SDL_uikit_main.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
F3CB956E26B5E0A600B9C980 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F3CB963B26B5E14400B9C980 /* SDL_uikit_main.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
|
@ -9528,54 +9422,6 @@
|
|||
};
|
||||
name = Release;
|
||||
};
|
||||
F3CB94B826B5E0A400B9C980 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
PRODUCT_NAME = SDLmain;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
F3CB94B926B5E0A400B9C980 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
PRODUCT_NAME = SDLmain;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
F3CB963626B5E0A600B9C980 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
PRODUCT_NAME = SDLmain;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
F3CB963726B5E0A600B9C980 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
PRODUCT_NAME = SDLmain;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
|
@ -9678,24 +9524,6 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
F3CB94B726B5E0A400B9C980 /* Build configuration list for PBXNativeTarget "SDLmain-iOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
F3CB94B826B5E0A400B9C980 /* Debug */,
|
||||
F3CB94B926B5E0A400B9C980 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
F3CB963526B5E0A600B9C980 /* Build configuration list for PBXNativeTarget "SDLmain-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
F3CB963626B5E0A600B9C980 /* Debug */,
|
||||
F3CB963726B5E0A600B9C980 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
|
|
2621
externals/SDL/acinclude/libtool.m4
vendored
2621
externals/SDL/acinclude/libtool.m4
vendored
File diff suppressed because it is too large
Load diff
127
externals/SDL/acinclude/ltoptions.m4
vendored
127
externals/SDL/acinclude/ltoptions.m4
vendored
|
@ -1,14 +1,14 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7 ltoptions.m4
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION],
|
|||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
|
@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[
|
|||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
|||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `dlopen' option into LT_INIT's first parameter.])
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
|
@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
|||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
|
@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
|||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the `shared' and
|
||||
# `disable-shared' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
|
@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared],
|
|||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
|||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the `static' and
|
||||
# `disable-static' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
|
@ -226,14 +228,14 @@ AC_ARG_ENABLE([static],
|
|||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
|||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||
# and `disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
|
@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install],
|
|||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
|||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `fast-install' option into LT_INIT's first parameter.])
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
|
@ -319,11 +321,64 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
|||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
|
@ -334,19 +389,17 @@ m4_define([_LT_WITH_PIC],
|
|||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
@ -359,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
|
|||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `pic-only' option into LT_INIT's first parameter.])
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
|
|
7
externals/SDL/acinclude/ltsugar.m4
vendored
7
externals/SDL/acinclude/ltsugar.m4
vendored
|
@ -1,6 +1,7 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -33,7 +34,7 @@ m4_define([_lt_join],
|
|||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59 which quotes differently.
|
||||
# Autoconf-2.59, which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
|
@ -44,7 +45,7 @@ m4_define([lt_unquote], $1)
|
|||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
|
|
12
externals/SDL/acinclude/ltversion.m4
vendored
12
externals/SDL/acinclude/ltversion.m4
vendored
|
@ -1,6 +1,6 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -9,15 +9,15 @@
|
|||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3337 ltversion.m4
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
|
|
7
externals/SDL/acinclude/lt~obsolete.m4
vendored
7
externals/SDL/acinclude/lt~obsolete.m4
vendored
|
@ -1,6 +1,7 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -11,7 +12,7 @@
|
|||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
|
@ -25,7 +26,7 @@
|
|||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
|
|
5615
externals/SDL/build-scripts/ltmain.sh
vendored
5615
externals/SDL/build-scripts/ltmain.sh
vendored
File diff suppressed because it is too large
Load diff
2
externals/SDL/build-scripts/winrtbuild.ps1
vendored
2
externals/SDL/build-scripts/winrtbuild.ps1
vendored
|
@ -39,7 +39,7 @@
|
|||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.0.18"
|
||||
$SDLVersion = "2.0.19"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
|
|
11
externals/SDL/cmake/sdlchecks.cmake
vendored
11
externals/SDL/cmake/sdlchecks.cmake
vendored
|
@ -418,7 +418,7 @@ macro(CheckX11)
|
|||
check_include_file(X11/extensions/Xinerama.h HAVE_XINERAMA_H)
|
||||
check_include_file(X11/extensions/XInput2.h HAVE_XINPUT2_H)
|
||||
check_include_file(X11/extensions/Xrandr.h HAVE_XRANDR_H)
|
||||
check_include_file(X11/extensions/Xfixes.h HAVE_XFIXES_H)
|
||||
check_include_file(X11/extensions/Xfixes.h HAVE_XFIXES_H_)
|
||||
check_include_file(X11/extensions/Xrender.h HAVE_XRENDER_H)
|
||||
check_include_file(X11/extensions/scrnsaver.h HAVE_XSS_H)
|
||||
check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
|
||||
|
@ -538,6 +538,15 @@ macro(CheckX11)
|
|||
endif()
|
||||
|
||||
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
|
||||
if(SDL_X11_XFIXES AND HAVE_XFIXES_H_ AND HAVE_XINPUT2_H)
|
||||
check_c_source_compiles("
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
BarrierEventID b;
|
||||
int main(void) { }" HAVE_XFIXES_H)
|
||||
endif()
|
||||
if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H)
|
||||
if(HAVE_X11_SHARED AND XFIXES_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"")
|
||||
|
|
3397
externals/SDL/configure
vendored
3397
externals/SDL/configure
vendored
File diff suppressed because it is too large
Load diff
111
externals/SDL/configure.ac
vendored
111
externals/SDL/configure.ac
vendored
|
@ -22,9 +22,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
|
|||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=18
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=18
|
||||
SDL_MICRO_VERSION=19
|
||||
SDL_INTERFACE_AGE=1
|
||||
SDL_BINARY_AGE=19
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
AC_SUBST(SDL_MAJOR_VERSION)
|
||||
|
@ -1973,12 +1973,16 @@ XITouchClassInfo *t;
|
|||
if test x$enable_video_x11_xfixes = xyes; then
|
||||
definitely_enable_video_x11_xfixes=no
|
||||
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
|
||||
AC_CHECK_HEADER(X11/extensions/Xfixes.h,
|
||||
have_xfixes_h_hdr=yes,
|
||||
have_xfixes_h_hdr=no,
|
||||
[#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>])
|
||||
AC_MSG_CHECKING(for X11/extensions/Xfixes.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/Xfixes.h>]],
|
||||
[BarrierEventID b;])],
|
||||
[have_xfixes_h_hdr=yes],
|
||||
[have_xfixes_h_hdr=no])
|
||||
AC_MSG_RESULT($have_xfixes_h_hdr)
|
||||
if test x$have_xfixes_h_hdr = xyes; then
|
||||
if test x$enable_x11_shared = xyes && test x$xfixes_lib != x ; then
|
||||
echo "-- dynamic libXfixes -> $xfixes_lib"
|
||||
|
@ -3183,6 +3187,21 @@ CheckWINDOWS()
|
|||
CheckStackBoundary
|
||||
}
|
||||
|
||||
dnl Determine whether the compiler can produce OS/2 executables
|
||||
CheckOS2()
|
||||
{
|
||||
AC_MSG_CHECKING(OS/2 compiler)
|
||||
have_os2_gcc=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <os2.h>]],
|
||||
[])],[have_os2_gcc=yes],[])
|
||||
AC_MSG_RESULT($have_os2_gcc)
|
||||
if test x$have_os2_gcc != xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** Your compiler ($CC) does not produce OS/2 executables!
|
||||
])
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Find the DirectX includes and libraries
|
||||
CheckDIRECTX()
|
||||
{
|
||||
|
@ -4381,6 +4400,80 @@ case "$host" in
|
|||
have_timers=yes
|
||||
fi
|
||||
;;
|
||||
*-*-os2*)
|
||||
ARCH=os2
|
||||
if test "$build" != "$host"; then # cross-compiling
|
||||
# Default cross-compile location
|
||||
ac_default_prefix=/@unixroot/usr/local/cross-tools/$host
|
||||
else
|
||||
# Look for the location of the tools and install there
|
||||
if test "$BUILD_PREFIX" != ""; then
|
||||
ac_default_prefix=$BUILD_PREFIX
|
||||
fi
|
||||
fi
|
||||
enable_static=no # disable static builds
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -DBUILD_SDL -DOS2EMX_PLAIN_CHAR"
|
||||
CheckOS2
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
|
||||
# Set up the core platform files
|
||||
SOURCES="$SOURCES $srcdir/src/core/os2/*.c"
|
||||
if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
|
||||
fi
|
||||
# Use the Unix locale APIs.
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_OS2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/video/os2/*.c"
|
||||
have_video=yes
|
||||
SUMMARY_video="${SUMMARY_video} os/2"
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_OS2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/os2/*.c"
|
||||
have_audio=yes
|
||||
SUMMARY_audio="${SUMMARY_audio} os/2"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmmpm2"
|
||||
fi
|
||||
# Set up files for the thread library
|
||||
if test x$enable_threads = xyes; then
|
||||
AC_DEFINE(SDL_THREAD_OS2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/thread/os2/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
|
||||
have_threads=yes
|
||||
fi
|
||||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
AC_DEFINE(SDL_TIMER_OS2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/timer/os2/*.c"
|
||||
have_timers=yes
|
||||
fi
|
||||
# Set up files for the shared object loading library
|
||||
if test x$enable_loadso = xyes; then
|
||||
AC_DEFINE(SDL_LOADSO_OS2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/loadso/os2/*.c"
|
||||
have_loadso=yes
|
||||
fi
|
||||
# Set up files for the filesystem library
|
||||
if test x$enable_filesystem = xyes; then
|
||||
AC_DEFINE(SDL_FILESYSTEM_OS2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/filesystem/os2/*.c"
|
||||
have_filesystem=yes
|
||||
fi
|
||||
# Set up files for the joystick library
|
||||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_OS2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/os2/*.c"
|
||||
have_joystick=yes
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([
|
||||
*** Unsupported host: Please add to configure.ac
|
||||
|
|
6
externals/SDL/debian/changelog
vendored
6
externals/SDL/debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
|||
libsdl2 (2.0.19) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.19
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Tue, 30 Nov 2021 09:57:40 -0800
|
||||
|
||||
libsdl2 (2.0.18) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.18
|
||||
|
|
42
externals/SDL/docs/README-ios.md
vendored
42
externals/SDL/docs/README-ios.md
vendored
|
@ -8,41 +8,27 @@ Requirements: Mac OS X 10.8 or later and the iOS 7+ SDK.
|
|||
|
||||
Instructions:
|
||||
|
||||
1. Open SDL.xcodeproj (located in Xcode/SDL) in Xcode.
|
||||
2. Select your desired target, and hit build.
|
||||
|
||||
There are three build targets:
|
||||
- libSDL.a:
|
||||
Build SDL as a statically linked library
|
||||
- testsdl:
|
||||
Build a test program (there are known test failures which are fine)
|
||||
- Template:
|
||||
Package a project template together with the SDL for iPhone static libraries and copies of the SDL headers. The template includes proper references to the SDL library and headers, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen.
|
||||
|
||||
|
||||
Build SDL for iOS from the command line
|
||||
==============================================================================
|
||||
|
||||
1. cd (PATH WHERE THE SDL CODE IS)
|
||||
2. xcodebuild -project Xcode/SDL/SDL.xcodeproj -target 'Static Library-iOS' -configuration Release -sdk iphoneos13.2 clean build
|
||||
1. Open SDL.xcodeproj (located in Xcode/SDL) in Xcode.
|
||||
2. Select your desired target, and hit build.
|
||||
|
||||
|
||||
Using the Simple DirectMedia Layer for iOS
|
||||
==============================================================================
|
||||
|
||||
FIXME: This needs to be updated for the latest methods
|
||||
1. Run Xcode and create a new project using the iOS Game template, selecting the Objective C language and Metal game technology.
|
||||
2. In the main view, delete all files except for Assets and LaunchScreen
|
||||
3. Right click the project in the main view, select "Add Files...", and add the SDL project, Xcode/SDL/SDL.xcodeproj
|
||||
4. Select the project in the main view, go to the "Info" tab and under "Custom iOS Target Properties" remove the line "Main storyboard file base name"
|
||||
5. Select the project in the main view, go to the "Build Settings" tab, select "All", and edit "Header Search Path" and drag over the SDL "Public Headers" folder from the left
|
||||
6. Select the project in the main view, go to the "Build Phases" tab, select "Link Binary With Libraries", and add SDL2.framework from "Framework-iOS"
|
||||
7. Select the project in the main view, go to the "General" tab, scroll down to "Frameworks, Libraries, and Embedded Content", and select "Embed & Sign" for the SDL library.
|
||||
8. In the main view, expand SDL -> Library Source -> main -> uikit and drag SDL_uikit_main.c into your game files
|
||||
9. Add the source files that you would normally have for an SDL program, making sure to have #include "SDL.h" at the top of the file containing your main() function.
|
||||
10. Add any assets that your application needs.
|
||||
11. Enjoy!
|
||||
|
||||
Here is the easiest method:
|
||||
1. Build the SDL library (libSDL2.a) and the iPhone SDL Application template.
|
||||
2. Install the iPhone SDL Application template by copying it to one of Xcode's template directories. I recommend creating a directory called "SDL" in "/Developer/Platforms/iOS.platform/Developer/Library/Xcode/Project Templates/" and placing it there.
|
||||
3. Start a new project using the template. The project should be immediately ready for use with SDL.
|
||||
|
||||
Here is a more manual method:
|
||||
1. Create a new iOS view based application.
|
||||
2. Build the SDL static library (libSDL2.a) for iOS and include them in your project. Xcode will ignore the library that is not currently of the correct architecture, hence your app will work both on iOS and in the iOS Simulator.
|
||||
3. Include the SDL header files in your project.
|
||||
4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iOS provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iOS produces its user interface programmatically.
|
||||
5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell Xcode not to use the project prefix file, as it includes Objective-C code.
|
||||
TODO: Add information regarding App Store requirements such as icons, etc.
|
||||
|
||||
|
||||
Notes -- Retina / High-DPI and window sizes
|
||||
|
|
4
externals/SDL/docs/README-macos.md
vendored
4
externals/SDL/docs/README-macos.md
vendored
|
@ -239,8 +239,8 @@ Some of you won't want to use the Stationary so I'll give some tips:
|
|||
* Remove "main.m" from your project
|
||||
* Remove "MainMenu.xib" from your project
|
||||
* Remove "AppDelegates.*" from your project
|
||||
* Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
|
||||
* Add "$(HOME)/Library/Frameworks" to the frameworks search path
|
||||
* Add "\$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
|
||||
* Add "\$(HOME)/Library/Frameworks" to the frameworks search path
|
||||
* Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS"
|
||||
* Add your files
|
||||
* Clean and build
|
||||
|
|
7
externals/SDL/include/SDL_config.h.cmake
vendored
7
externals/SDL/include/SDL_config.h.cmake
vendored
|
@ -315,6 +315,7 @@
|
|||
#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OS2 @SDL_AUDIO_DRIVER_OS2@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_VITA @SDL_AUDIO_DRIVER_VITA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PSP @SDL_AUDIO_DRIVER_PSP@
|
||||
|
||||
/* Enable various input drivers */
|
||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||
|
@ -337,6 +338,7 @@
|
|||
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
|
||||
#cmakedefine SDL_JOYSTICK_VIRTUAL @SDL_JOYSTICK_VIRTUAL@
|
||||
#cmakedefine SDL_JOYSTICK_VITA @SDL_JOYSTICK_VITA@
|
||||
#cmakedefine SDL_JOYSTICK_PSP @SDL_JOYSTICK_PSP@
|
||||
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
|
||||
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
||||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||
|
@ -367,6 +369,7 @@
|
|||
#cmakedefine SDL_THREAD_WINDOWS @SDL_THREAD_WINDOWS@
|
||||
#cmakedefine SDL_THREAD_OS2 @SDL_THREAD_OS2@
|
||||
#cmakedefine SDL_THREAD_VITA @SDL_THREAD_VITA@
|
||||
#cmakedefine SDL_THREAD_PSP @SDL_THREAD_PSP@
|
||||
|
||||
/* Enable various timer systems */
|
||||
#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@
|
||||
|
@ -375,6 +378,7 @@
|
|||
#cmakedefine SDL_TIMER_WINDOWS @SDL_TIMER_WINDOWS@
|
||||
#cmakedefine SDL_TIMER_OS2 @SDL_TIMER_OS2@
|
||||
#cmakedefine SDL_TIMER_VITA @SDL_TIMER_VITA@
|
||||
#cmakedefine SDL_TIMER_PSP @SDL_TIMER_PSP@
|
||||
|
||||
/* Enable various video drivers */
|
||||
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
|
||||
|
@ -395,6 +399,7 @@
|
|||
#cmakedefine SDL_VIDEO_DRIVER_OS2 @SDL_VIDEO_DRIVER_OS2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_QNX @SDL_VIDEO_DRIVER_QNX@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_RISCOS @SDL_VIDEO_DRIVER_RISCOS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_PSP @SDL_VIDEO_DRIVER_PSP@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@
|
||||
|
@ -439,6 +444,7 @@
|
|||
#cmakedefine SDL_VIDEO_RENDER_DIRECTFB @SDL_VIDEO_RENDER_DIRECTFB@
|
||||
#cmakedefine SDL_VIDEO_RENDER_METAL @SDL_VIDEO_RENDER_METAL@
|
||||
#cmakedefine SDL_VIDEO_RENDER_VITA_GXM @SDL_VIDEO_RENDER_VITA_GXM@
|
||||
#cmakedefine SDL_VIDEO_RENDER_PSP @SDL_VIDEO_RENDER_PSP@
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@
|
||||
|
@ -469,6 +475,7 @@
|
|||
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
|
||||
#cmakedefine SDL_POWER_VITA @SDL_POWER_VITA@
|
||||
#cmakedefine SDL_POWER_PSP @SDL_POWER_PSP@
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#cmakedefine SDL_FILESYSTEM_ANDROID @SDL_FILESYSTEM_ANDROID@
|
||||
|
|
12
externals/SDL/include/SDL_config_os2.h
vendored
12
externals/SDL/include/SDL_config_os2.h
vendored
|
@ -61,25 +61,31 @@
|
|||
|
||||
#define HAVE_LIBC 1
|
||||
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
#if 0 /* see Makefile */
|
||||
#define HAVE_ICONV 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#endif
|
||||
|
||||
/* #undef HAVE_DLOPEN */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
|
|
2
externals/SDL/include/SDL_config_psp.h
vendored
2
externals/SDL/include/SDL_config_psp.h
vendored
|
@ -132,7 +132,7 @@
|
|||
#define SDL_THREAD_PSP 1
|
||||
|
||||
/* Enable the PSP timer support (src/timer/psp/\*.c) */
|
||||
#define SDL_TIMERS_PSP 1
|
||||
#define SDL_TIMER_PSP 1
|
||||
|
||||
/* Enable the PSP joystick driver (src/joystick/psp/\*.c) */
|
||||
#define SDL_JOYSTICK_PSP 1
|
||||
|
|
9
externals/SDL/include/SDL_main.h
vendored
9
externals/SDL/include/SDL_main.h
vendored
|
@ -83,6 +83,15 @@
|
|||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#elif defined(__PSP__)
|
||||
/* On PSP SDL provides a main function that sets the module info,
|
||||
activates the GPU and starts the thread required to be able to exit
|
||||
the software.
|
||||
|
||||
If you provide this yourself, you may define SDL_MAIN_HANDLED
|
||||
*/
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#endif
|
||||
#endif /* SDL_MAIN_HANDLED */
|
||||
|
||||
|
|
2
externals/SDL/include/SDL_version.h
vendored
2
externals/SDL/include/SDL_version.h
vendored
|
@ -59,7 +59,7 @@ typedef struct SDL_version
|
|||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 0
|
||||
#define SDL_PATCHLEVEL 18
|
||||
#define SDL_PATCHLEVEL 19
|
||||
|
||||
/**
|
||||
* Macro to determine SDL version program was compiled against.
|
||||
|
|
18
externals/SDL/src/audio/psp/SDL_pspaudio.c
vendored
18
externals/SDL/src/audio/psp/SDL_pspaudio.c
vendored
|
@ -25,6 +25,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h> /* memalign() */
|
||||
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_error.h"
|
||||
|
@ -38,7 +39,7 @@
|
|||
#include <pspthreadman.h>
|
||||
|
||||
/* The tag name used by PSP audio */
|
||||
#define PSPAUDIO_DRIVER_NAME "psp"
|
||||
#define PSPAUDIO_DRIVER_NAME "psp"
|
||||
|
||||
static int
|
||||
PSPAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
|
@ -116,6 +117,7 @@ static void PSPAUDIO_WaitDevice(_THIS)
|
|||
{
|
||||
/* Because we block when sending audio, there's no need for this function to do anything. */
|
||||
}
|
||||
|
||||
static Uint8 *PSPAUDIO_GetDeviceBuf(_THIS)
|
||||
{
|
||||
return this->hidden->mixbufs[this->hidden->next_buffer];
|
||||
|
@ -126,7 +128,7 @@ static void PSPAUDIO_CloseDevice(_THIS)
|
|||
if (this->hidden->channel >= 0) {
|
||||
sceAudioChRelease(this->hidden->channel);
|
||||
}
|
||||
free(this->hidden->rawbuf); /* this uses memalign(), not SDL_malloc(). */
|
||||
free(this->hidden->rawbuf); /* this uses memalign(), not SDL_malloc(). */
|
||||
SDL_free(this->hidden);
|
||||
}
|
||||
|
||||
|
@ -143,7 +145,6 @@ static void PSPAUDIO_ThreadInit(_THIS)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
PSPAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
|
@ -157,14 +158,9 @@ PSPAUDIO_Init(SDL_AudioDriverImpl * impl)
|
|||
|
||||
/* PSP audio device */
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
/*
|
||||
impl->HasCaptureSupport = 1;
|
||||
|
||||
impl->OnlyHasDefaultCaptureDevice = 1;
|
||||
*/
|
||||
/*
|
||||
impl->DetectDevices = DSOUND_DetectDevices;
|
||||
impl->Deinitialize = DSOUND_Deinitialize;
|
||||
impl->HasCaptureSupport = 1;
|
||||
impl->OnlyHasDefaultCaptureDevice = 1;
|
||||
*/
|
||||
return 1; /* this audio target is available. */
|
||||
}
|
||||
|
@ -173,8 +169,6 @@ AudioBootStrap PSPAUDIO_bootstrap = {
|
|||
"psp", "PSP audio driver", PSPAUDIO_Init, 0
|
||||
};
|
||||
|
||||
/* SDL_AUDI */
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_PSP */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
17
externals/SDL/src/audio/vita/SDL_vitaaudio.c
vendored
17
externals/SDL/src/audio/vita/SDL_vitaaudio.c
vendored
|
@ -25,6 +25,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h> /* memalign() */
|
||||
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_error.h"
|
||||
|
@ -38,10 +39,10 @@
|
|||
#include <psp2/audioout.h>
|
||||
|
||||
#define SCE_AUDIO_SAMPLE_ALIGN(s) (((s) + 63) & ~63)
|
||||
#define SCE_AUDIO_MAX_VOLUME 0x8000
|
||||
#define SCE_AUDIO_MAX_VOLUME 0x8000
|
||||
|
||||
/* The tag name used by VITA audio */
|
||||
#define VITAAUD_DRIVER_NAME "vita"
|
||||
#define VITAAUD_DRIVER_NAME "vita"
|
||||
|
||||
static int
|
||||
VITAAUD_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
|
@ -135,10 +136,11 @@ static void VITAAUD_CloseDevice(_THIS)
|
|||
}
|
||||
|
||||
if (this->hidden->rawbuf != NULL) {
|
||||
free(this->hidden->rawbuf);
|
||||
free(this->hidden->rawbuf); /* this uses memalign(), not SDL_malloc(). */
|
||||
this->hidden->rawbuf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void VITAAUD_ThreadInit(_THIS)
|
||||
{
|
||||
/* Increase the priority of this audio thread by 1 to put it
|
||||
|
@ -152,11 +154,9 @@ static void VITAAUD_ThreadInit(_THIS)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
VITAAUD_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
|
||||
/* Set the function pointers */
|
||||
impl->OpenDevice = VITAAUD_OpenDevice;
|
||||
impl->PlayDevice = VITAAUD_PlayDevice;
|
||||
|
@ -167,11 +167,10 @@ VITAAUD_Init(SDL_AudioDriverImpl * impl)
|
|||
|
||||
/* VITA audio device */
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
/*
|
||||
/*
|
||||
impl->HasCaptureSupport = 1;
|
||||
|
||||
impl->OnlyHasDefaultInputDevice = 1;
|
||||
*/
|
||||
*/
|
||||
return 1; /* this audio target is available. */
|
||||
}
|
||||
|
||||
|
@ -179,8 +178,6 @@ AudioBootStrap VITAAUD_bootstrap = {
|
|||
"vita", "VITA audio driver", VITAAUD_Init, 0
|
||||
};
|
||||
|
||||
/* SDL_AUDI */
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_VITA */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
1
externals/SDL/src/audio/wasapi/SDL_wasapi.c
vendored
1
externals/SDL/src/audio/wasapi/SDL_wasapi.c
vendored
|
@ -425,7 +425,6 @@ ReleaseWasapiDevice(_THIS)
|
|||
{
|
||||
if (this->hidden->client) {
|
||||
IAudioClient_Stop(this->hidden->client);
|
||||
IAudioClient_SetEventHandle(this->hidden->client, NULL);
|
||||
IAudioClient_Release(this->hidden->client);
|
||||
this->hidden->client = NULL;
|
||||
}
|
||||
|
|
28
externals/SDL/src/core/linux/SDL_evdev.c
vendored
28
externals/SDL/src/core/linux/SDL_evdev.c
vendored
|
@ -57,6 +57,10 @@
|
|||
#define ABS_MT_TRACKING_ID 0x39
|
||||
#define ABS_MT_PRESSURE 0x3a
|
||||
#endif
|
||||
#ifndef REL_WHEEL_HI_RES
|
||||
#define REL_WHEEL_HI_RES 0x0b
|
||||
#define REL_HWHEEL_HI_RES 0x0c
|
||||
#endif
|
||||
|
||||
typedef struct SDL_evdevlist_item
|
||||
{
|
||||
|
@ -92,6 +96,9 @@ typedef struct SDL_evdevlist_item
|
|||
|
||||
} * touchscreen_data;
|
||||
|
||||
SDL_bool high_res_wheel;
|
||||
SDL_bool high_res_hwheel;
|
||||
|
||||
struct SDL_evdevlist_item *next;
|
||||
} SDL_evdevlist_item;
|
||||
|
||||
|
@ -378,10 +385,20 @@ SDL_EVDEV_Poll(void)
|
|||
SDL_SendMouseMotion(mouse->focus, mouse->mouseID, SDL_TRUE, 0, events[i].value);
|
||||
break;
|
||||
case REL_WHEEL:
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, 0, events[i].value, SDL_MOUSEWHEEL_NORMAL);
|
||||
if (!item->high_res_wheel)
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, 0, events[i].value, SDL_MOUSEWHEEL_NORMAL);
|
||||
break;
|
||||
case REL_WHEEL_HI_RES:
|
||||
SDL_assert(item->high_res_wheel);
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, 0, events[i].value / 120.0f, SDL_MOUSEWHEEL_NORMAL);
|
||||
break;
|
||||
case REL_HWHEEL:
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, events[i].value, 0, SDL_MOUSEWHEEL_NORMAL);
|
||||
if (!item->high_res_hwheel)
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, events[i].value, 0, SDL_MOUSEWHEEL_NORMAL);
|
||||
break;
|
||||
case REL_HWHEEL_HI_RES:
|
||||
SDL_assert(item->high_res_hwheel);
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, events[i].value / 120.0f, 0, SDL_MOUSEWHEEL_NORMAL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -715,6 +732,7 @@ SDL_EVDEV_device_added(const char *dev_path, int udev_class)
|
|||
{
|
||||
int ret;
|
||||
SDL_evdevlist_item *item;
|
||||
unsigned long relbit[NBITS(REL_MAX)] = { 0 };
|
||||
|
||||
/* Check to make sure it's not already in list. */
|
||||
for (item = _this->first; item != NULL; item = item->next) {
|
||||
|
@ -741,11 +759,17 @@ SDL_EVDEV_device_added(const char *dev_path, int udev_class)
|
|||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
if (ioctl(item->fd, EVIOCGBIT(EV_REL, sizeof(relbit)), relbit) >= 0) {
|
||||
item->high_res_wheel = test_bit(REL_WHEEL_HI_RES, relbit);
|
||||
item->high_res_hwheel = test_bit(REL_HWHEEL_HI_RES, relbit);
|
||||
}
|
||||
|
||||
if (udev_class & SDL_UDEV_DEVICE_TOUCHSCREEN) {
|
||||
item->is_touchscreen = 1;
|
||||
|
||||
if ((ret = SDL_EVDEV_init_touchscreen(item)) < 0) {
|
||||
close(item->fd);
|
||||
SDL_free(item->path);
|
||||
SDL_free(item);
|
||||
return ret;
|
||||
}
|
||||
|
|
2
externals/SDL/src/core/linux/SDL_fcitx.c
vendored
2
externals/SDL/src/core/linux/SDL_fcitx.c
vendored
|
@ -205,7 +205,7 @@ Fcitx_SetCapabilities(void *data,
|
|||
const char *internal_editing)
|
||||
{
|
||||
FcitxClient *client = (FcitxClient *)data;
|
||||
Uint32 caps = 0;
|
||||
Uint64 caps = 0;
|
||||
if (!client->ic_path) {
|
||||
return;
|
||||
}
|
||||
|
|
2
externals/SDL/src/core/os2/SDL_os2.c
vendored
2
externals/SDL/src/core/os2/SDL_os2.c
vendored
|
@ -23,7 +23,7 @@
|
|||
|
||||
#if defined(__OS2__)
|
||||
|
||||
#include "geniconv/geniconv.h"
|
||||
#include "SDL_os2.h"
|
||||
|
||||
/* SDL_OS2Quit() will be called from SDL_QuitSubSystem() */
|
||||
void SDL_OS2Quit(void)
|
||||
|
|
9
externals/SDL/src/core/os2/SDL_os2.h
vendored
9
externals/SDL/src/core/os2/SDL_os2.h
vendored
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_stdinc.h"
|
||||
#include "geniconv/geniconv.h"
|
||||
|
||||
#ifdef OS2DEBUG
|
||||
#if (OS2DEBUG-0 >= 2)
|
||||
|
@ -39,10 +38,16 @@
|
|||
|
||||
#endif /* OS2DEBUG */
|
||||
|
||||
|
||||
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
|
||||
#define OS2_SysToUTF8(S) SDL_iconv_string("UTF-8", "", (char *)(S), SDL_strlen(S)+1)
|
||||
#define OS2_UTF8ToSys(S) SDL_iconv_string("", "UTF-8", (char *)(S), SDL_strlen(S)+1)
|
||||
#define libiconv_clean() do {} while(0)
|
||||
#else
|
||||
/* StrUTF8New() - geniconv/sys2utf8.c */
|
||||
#include "geniconv/geniconv.h"
|
||||
#define OS2_SysToUTF8(S) StrUTF8New(1, (S), SDL_strlen((S)) + 1)
|
||||
#define OS2_UTF8ToSys(S) StrUTF8New(0, (char *)(S), SDL_strlen((S)) + 1)
|
||||
#endif
|
||||
|
||||
/* SDL_OS2Quit() will be called from SDL_QuitSubSystem() */
|
||||
void SDL_OS2Quit(void);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#ifndef GENICONV_H
|
||||
#define GENICONV_H
|
||||
|
||||
#include <iconv.h>
|
||||
#include "iconv.h"
|
||||
|
||||
#ifdef iconv_open
|
||||
#undef iconv_open
|
||||
|
|
4
externals/SDL/src/core/os2/iconv2.lbc
vendored
Executable file
4
externals/SDL/src/core/os2/iconv2.lbc
vendored
Executable file
|
@ -0,0 +1,4 @@
|
|||
# OpenWatcom exports file for libiconv
|
||||
++'libiconv'.'ICONV2'..'_libiconv'
|
||||
++'libiconv_close'.'ICONV2'..'_libiconv_close'
|
||||
++'libiconv_open'.'ICONV2'..'_libiconv_open'
|
3
externals/SDL/src/events/SDL_events.c
vendored
3
externals/SDL/src/events/SDL_events.c
vendored
|
@ -287,9 +287,10 @@ SDL_LogEvent(const SDL_Event *event)
|
|||
|
||||
|
||||
SDL_EVENT_CASE(SDL_MOUSEWHEEL)
|
||||
SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u which=%u x=%d y=%d direction=%s)",
|
||||
SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u which=%u x=%d y=%d preciseX=%f preciseY=%f direction=%s)",
|
||||
(uint) event->wheel.timestamp, (uint) event->wheel.windowID,
|
||||
(uint) event->wheel.which, (int) event->wheel.x, (int) event->wheel.y,
|
||||
event->wheel.preciseX, event->wheel.preciseY,
|
||||
event->wheel.direction == SDL_MOUSEWHEEL_NORMAL ? "normal" : "flipped");
|
||||
break;
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
/* System dependent filesystem routines */
|
||||
|
||||
#include "../../core/os2/SDL_os2.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_filesystem.h"
|
||||
#include "../../core/os2/SDL_os2.h"
|
||||
|
||||
#define INCL_DOSFILEMGR
|
||||
#define INCL_DOSPROCESS
|
||||
|
@ -43,7 +43,7 @@ SDL_GetBasePath(void)
|
|||
ULONG ulRC = DosGetInfoBlocks(&tib, &pib);
|
||||
PCHAR pcEnd;
|
||||
ULONG cbResult;
|
||||
CHAR acBuf[_MAX_PATH];
|
||||
CHAR acBuf[CCHMAXPATH];
|
||||
|
||||
if (ulRC != NO_ERROR) {
|
||||
debug_os2("DosGetInfoBlocks() failed, rc = %u", ulRC);
|
||||
|
@ -73,7 +73,7 @@ char *
|
|||
SDL_GetPrefPath(const char *org, const char *app)
|
||||
{
|
||||
PSZ pszPath;
|
||||
CHAR acBuf[_MAX_PATH];
|
||||
CHAR acBuf[CCHMAXPATH];
|
||||
int lPosApp, lPosOrg;
|
||||
PSZ pszApp, pszOrg;
|
||||
|
||||
|
|
7
externals/SDL/src/hidapi/windows/hid.c
vendored
7
externals/SDL/src/hidapi/windows/hid.c
vendored
|
@ -53,7 +53,6 @@ typedef LONG NTSTATUS;
|
|||
#define memset SDL_memset
|
||||
#define strcmp SDL_strcmp
|
||||
#define strlen SDL_strlen
|
||||
#define strncpy SDL_strlcpy
|
||||
#define strstr SDL_strstr
|
||||
#define strtol SDL_strtol
|
||||
#define wcscmp SDL_wcscmp
|
||||
|
@ -105,9 +104,6 @@ extern "C" {
|
|||
#define MIN(x,y) ((x) < (y)? (x): (y))
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* Thanks Microsoft, but I know how to use strncpy(). */
|
||||
#pragma warning(disable:4996)
|
||||
|
||||
/* Yes, we have some unreferenced formal parameters */
|
||||
#pragma warning(disable:4100)
|
||||
#endif
|
||||
|
@ -550,8 +546,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
|
|||
if (str) {
|
||||
len = strlen(str);
|
||||
cur_dev->path = (char*) calloc(len+1, sizeof(char));
|
||||
strncpy(cur_dev->path, str, len+1);
|
||||
cur_dev->path[len] = '\0';
|
||||
memcpy(cur_dev->path, str, len+1);
|
||||
}
|
||||
else
|
||||
cur_dev->path = NULL;
|
||||
|
|
|
@ -895,6 +895,9 @@ static const char *s_ControllerMappings [] =
|
|||
#endif
|
||||
#if defined(SDL_JOYSTICK_VITA)
|
||||
"50535669746120436f6e74726f6c6c65,PSVita Controller,a:b2,b:b1,back:b10,dpdown:b6,dpleft:b7,dpright:b9,dpup:b8,leftshoulder:b4,leftstick:b14,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,",
|
||||
#endif
|
||||
#if defined(SDL_JOYSTICK_PSP)
|
||||
"505350206275696c74696e206a6f7970,PSP builtin joypad,y:b0,b:b1,a:b2,x:b3,leftshoulder:b4,rightshoulder:b5,dpdown:b6,dpleft:b7,dpup:b8,dpright:b9,back:b10,start:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
|
||||
#endif
|
||||
"hidapi,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
|
||||
NULL
|
||||
|
|
|
@ -66,6 +66,9 @@ static NSString *GCInputXboxShareButton = @"Button Share";
|
|||
#if defined(__MACOSX__) && (__MAC_OS_X_VERSION_MAX_ALLOWED <= 101600)
|
||||
+ (BOOL)supportsHIDDevice:(IOHIDDeviceRef)device;
|
||||
#endif
|
||||
#if !((__IPHONE_OS_VERSION_MAX_ALLOWED >= 130000) || (__APPLETV_OS_VERSION_MAX_ALLOWED >= 130000) || (__MAC_OS_VERSION_MAX_ALLOWED >= 1500000))
|
||||
@property(nonatomic, readonly) NSString *productCategory;
|
||||
#endif
|
||||
@end
|
||||
@interface GCExtendedGamepad (SDL)
|
||||
#if !((__IPHONE_OS_VERSION_MAX_ALLOWED >= 121000) || (__APPLETV_OS_VERSION_MAX_ALLOWED >= 121000) || (__MAC_OS_VERSION_MAX_ALLOWED >= 1401000))
|
||||
|
|
|
@ -63,10 +63,10 @@ static point c = { 78, 32767 };
|
|||
static point d = { 128, 32767 };
|
||||
|
||||
/* simple linear interpolation between two points */
|
||||
static SDL_INLINE void lerp (point *dest, point *a, point *b, float t)
|
||||
static SDL_INLINE void lerp (point *dest, point *pt_a, point *pt_b, float t)
|
||||
{
|
||||
dest->x = a->x + (b->x - a->x)*t;
|
||||
dest->y = a->y + (b->y - a->y)*t;
|
||||
dest->x = pt_a->x + (pt_b->x - pt_a->x)*t;
|
||||
dest->y = pt_a->y + (pt_b->y - pt_a->y)*t;
|
||||
}
|
||||
|
||||
/* evaluate a point on a bezier-curve. t goes from 0 to 1.0 */
|
||||
|
|
2
externals/SDL/src/libm/math_private.h
vendored
2
externals/SDL/src/libm/math_private.h
vendored
|
@ -27,7 +27,7 @@
|
|||
#define libm_hidden_def(x)
|
||||
#define strong_alias(x, y)
|
||||
|
||||
#ifndef __HAIKU__ /* already defined in a system header. */
|
||||
#if !defined(__HAIKU__) && !defined(__PSP__) /* already defined in a system header. */
|
||||
typedef unsigned int u_int32_t;
|
||||
#endif
|
||||
|
||||
|
|
19
externals/SDL/src/main/psp/SDL_psp_main.c
vendored
19
externals/SDL/src/main/psp/SDL_psp_main.c
vendored
|
@ -7,11 +7,11 @@
|
|||
|
||||
#include "SDL_main.h"
|
||||
#include <pspkernel.h>
|
||||
#include <pspdebug.h>
|
||||
#include <pspsdk.h>
|
||||
#include <pspthreadman.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef main
|
||||
#undef main
|
||||
#endif
|
||||
|
||||
/* If application's main() is redefined as SDL_main, and libSDLmain is
|
||||
linked, then this file will create the standard exit callback,
|
||||
|
@ -23,11 +23,12 @@
|
|||
PSP_MAIN_THREAD_STACK_SIZE, etc.
|
||||
*/
|
||||
|
||||
PSP_MODULE_INFO("SDL App", 0, 1, 1);
|
||||
PSP_MODULE_INFO("SDL App", 0, 1, 0);
|
||||
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_VFPU | THREAD_ATTR_USER);
|
||||
|
||||
int sdl_psp_exit_callback(int arg1, int arg2, void *common)
|
||||
{
|
||||
exit(0);
|
||||
sceKernelExitGame();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -43,7 +44,7 @@ int sdl_psp_callback_thread(SceSize args, void *argp)
|
|||
|
||||
int sdl_psp_setup_callbacks(void)
|
||||
{
|
||||
int thid = 0;
|
||||
int thid;
|
||||
thid = sceKernelCreateThread("update_thread",
|
||||
sdl_psp_callback_thread, 0x11, 0xFA0, 0, 0);
|
||||
if(thid >= 0)
|
||||
|
@ -53,12 +54,8 @@ int sdl_psp_setup_callbacks(void)
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
pspDebugScreenInit();
|
||||
sdl_psp_setup_callbacks();
|
||||
|
||||
/* Register sceKernelExitGame() to be called when we exit */
|
||||
atexit(sceKernelExitGame);
|
||||
|
||||
SDL_SetMainReady();
|
||||
|
||||
(void)SDL_main(argc, argv);
|
||||
|
|
8
externals/SDL/src/main/windows/version.rc
vendored
8
externals/SDL/src/main/windows/version.rc
vendored
|
@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,0,18,0
|
||||
PRODUCTVERSION 2,0,18,0
|
||||
FILEVERSION 2,0,19,0
|
||||
PRODUCTVERSION 2,0,19,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
FILEFLAGS 0x0L
|
||||
FILEOS 0x40004L
|
||||
|
@ -23,12 +23,12 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileDescription", "SDL\0"
|
||||
VALUE "FileVersion", "2, 0, 18, 0\0"
|
||||
VALUE "FileVersion", "2, 0, 19, 0\0"
|
||||
VALUE "InternalName", "SDL\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2021 Sam Lantinga\0"
|
||||
VALUE "OriginalFilename", "SDL2.dll\0"
|
||||
VALUE "ProductName", "Simple DirectMedia Layer\0"
|
||||
VALUE "ProductVersion", "2, 0, 18, 0\0"
|
||||
VALUE "ProductVersion", "2, 0, 19, 0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
102
externals/SDL/src/render/SDL_render.c
vendored
102
externals/SDL/src/render/SDL_render.c
vendored
|
@ -356,7 +356,11 @@ QueueCmdSetViewport(SDL_Renderer *renderer)
|
|||
if (cmd != NULL) {
|
||||
cmd->command = SDL_RENDERCMD_SETVIEWPORT;
|
||||
cmd->data.viewport.first = 0; /* render backend will fill this in. */
|
||||
SDL_memcpy(&cmd->data.viewport.rect, &renderer->viewport, sizeof (renderer->viewport));
|
||||
/* Convert SDL_FRect to SDL_Rect */
|
||||
cmd->data.viewport.rect.x = (int)SDL_floor(renderer->viewport.x);
|
||||
cmd->data.viewport.rect.y = (int)SDL_floor(renderer->viewport.y);
|
||||
cmd->data.viewport.rect.w = (int)SDL_floor(renderer->viewport.w);
|
||||
cmd->data.viewport.rect.h = (int)SDL_floor(renderer->viewport.h);
|
||||
retval = renderer->QueueSetViewport(renderer, cmd);
|
||||
if (retval < 0) {
|
||||
cmd->command = SDL_RENDERCMD_NO_OP;
|
||||
|
@ -382,7 +386,11 @@ QueueCmdSetClipRect(SDL_Renderer *renderer)
|
|||
} else {
|
||||
cmd->command = SDL_RENDERCMD_SETCLIPRECT;
|
||||
cmd->data.cliprect.enabled = renderer->clipping_enabled;
|
||||
SDL_memcpy(&cmd->data.cliprect.rect, &renderer->clip_rect, sizeof (cmd->data.cliprect.rect));
|
||||
/* Convert SDL_FRect to SDL_Rect */
|
||||
cmd->data.cliprect.rect.x = (int)SDL_floor(renderer->clip_rect.x);
|
||||
cmd->data.cliprect.rect.y = (int)SDL_floor(renderer->clip_rect.y);
|
||||
cmd->data.cliprect.rect.w = (int)SDL_floor(renderer->clip_rect.w);
|
||||
cmd->data.cliprect.rect.h = (int)SDL_floor(renderer->clip_rect.h);
|
||||
SDL_memcpy(&renderer->last_queued_cliprect, &renderer->clip_rect, sizeof (SDL_Rect));
|
||||
renderer->last_queued_cliprect_enabled = renderer->clipping_enabled;
|
||||
renderer->cliprect_queued = SDL_TRUE;
|
||||
|
@ -667,7 +675,7 @@ SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void GetWindowViewportValues(SDL_Renderer *renderer, int *logical_w, int *logical_h, SDL_Rect *viewport, SDL_FPoint *scale)
|
||||
static void GetWindowViewportValues(SDL_Renderer *renderer, int *logical_w, int *logical_h, SDL_FRect *viewport, SDL_FPoint *scale)
|
||||
{
|
||||
SDL_LockMutex(renderer->target_mutex);
|
||||
*logical_w = renderer->target ? renderer->logical_w_backup : renderer->logical_w;
|
||||
|
@ -756,7 +764,7 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event)
|
|||
SDL_Window *window = SDL_GetWindowFromID(event->motion.windowID);
|
||||
if (window == renderer->window) {
|
||||
int logical_w, logical_h;
|
||||
SDL_Rect viewport;
|
||||
SDL_FRect viewport;
|
||||
SDL_FPoint scale;
|
||||
GetWindowViewportValues(renderer, &logical_w, &logical_h, &viewport, &scale);
|
||||
if (logical_w) {
|
||||
|
@ -783,7 +791,7 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event)
|
|||
SDL_Window *window = SDL_GetWindowFromID(event->button.windowID);
|
||||
if (window == renderer->window) {
|
||||
int logical_w, logical_h;
|
||||
SDL_Rect viewport;
|
||||
SDL_FRect viewport;
|
||||
SDL_FPoint scale;
|
||||
GetWindowViewportValues(renderer, &logical_w, &logical_h, &viewport, &scale);
|
||||
if (logical_w) {
|
||||
|
@ -798,7 +806,7 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event)
|
|||
event->type == SDL_FINGERMOTION) {
|
||||
int logical_w, logical_h;
|
||||
float physical_w, physical_h;
|
||||
SDL_Rect viewport;
|
||||
SDL_FRect viewport;
|
||||
SDL_FPoint scale;
|
||||
GetWindowViewportValues(renderer, &logical_w, &logical_h, &viewport, &scale);
|
||||
|
||||
|
@ -2183,8 +2191,8 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)
|
|||
}
|
||||
|
||||
if (texture) {
|
||||
renderer->viewport.x = 0;
|
||||
renderer->viewport.y = 0;
|
||||
renderer->viewport.x = 0.0f;
|
||||
renderer->viewport.y = 0.0f;
|
||||
renderer->viewport.w = texture->w;
|
||||
renderer->viewport.h = texture->h;
|
||||
SDL_zero(renderer->clip_rect);
|
||||
|
@ -2393,16 +2401,19 @@ SDL_RenderSetViewport(SDL_Renderer * renderer, const SDL_Rect * rect)
|
|||
CHECK_RENDERER_MAGIC(renderer, -1);
|
||||
|
||||
if (rect) {
|
||||
renderer->viewport.x = (int)SDL_floor(rect->x * renderer->scale.x);
|
||||
renderer->viewport.y = (int)SDL_floor(rect->y * renderer->scale.y);
|
||||
renderer->viewport.w = (int)SDL_floor(rect->w * renderer->scale.x);
|
||||
renderer->viewport.h = (int)SDL_floor(rect->h * renderer->scale.y);
|
||||
renderer->viewport.x = rect->x * renderer->scale.x;
|
||||
renderer->viewport.y = rect->y * renderer->scale.y;
|
||||
renderer->viewport.w = rect->w * renderer->scale.x;
|
||||
renderer->viewport.h = rect->h * renderer->scale.y;
|
||||
} else {
|
||||
renderer->viewport.x = 0;
|
||||
renderer->viewport.y = 0;
|
||||
if (SDL_GetRendererOutputSize(renderer, &renderer->viewport.w, &renderer->viewport.h) < 0) {
|
||||
int w, h;
|
||||
renderer->viewport.x = 0.0f;
|
||||
renderer->viewport.y = 0.0f;
|
||||
if (SDL_GetRendererOutputSize(renderer, &w, &h) < 0) {
|
||||
return -1;
|
||||
}
|
||||
renderer->viewport.w = w;
|
||||
renderer->viewport.h = h;
|
||||
}
|
||||
retval = QueueCmdSetViewport(renderer);
|
||||
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
|
||||
|
@ -2414,10 +2425,10 @@ SDL_RenderGetViewport(SDL_Renderer * renderer, SDL_Rect * rect)
|
|||
CHECK_RENDERER_MAGIC(renderer, );
|
||||
|
||||
if (rect) {
|
||||
rect->x = (int)(renderer->viewport.x / renderer->scale.x);
|
||||
rect->y = (int)(renderer->viewport.y / renderer->scale.y);
|
||||
rect->w = (int)(renderer->viewport.w / renderer->scale.x);
|
||||
rect->h = (int)(renderer->viewport.h / renderer->scale.y);
|
||||
rect->x = (int)SDL_floor(renderer->viewport.x / renderer->scale.x);
|
||||
rect->y = (int)SDL_floor(renderer->viewport.y / renderer->scale.y);
|
||||
rect->w = (int)SDL_floor(renderer->viewport.w / renderer->scale.x);
|
||||
rect->h = (int)SDL_floor(renderer->viewport.h / renderer->scale.y);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2438,10 +2449,10 @@ SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect)
|
|||
|
||||
if (rect) {
|
||||
renderer->clipping_enabled = SDL_TRUE;
|
||||
renderer->clip_rect.x = (int)SDL_floor(rect->x * renderer->scale.x);
|
||||
renderer->clip_rect.y = (int)SDL_floor(rect->y * renderer->scale.y);
|
||||
renderer->clip_rect.w = (int)SDL_floor(rect->w * renderer->scale.x);
|
||||
renderer->clip_rect.h = (int)SDL_floor(rect->h * renderer->scale.y);
|
||||
renderer->clip_rect.x = rect->x * renderer->scale.x;
|
||||
renderer->clip_rect.y = rect->y * renderer->scale.y;
|
||||
renderer->clip_rect.w = rect->w * renderer->scale.x;
|
||||
renderer->clip_rect.h = rect->h * renderer->scale.y;
|
||||
} else {
|
||||
renderer->clipping_enabled = SDL_FALSE;
|
||||
SDL_zero(renderer->clip_rect);
|
||||
|
@ -2457,10 +2468,10 @@ SDL_RenderGetClipRect(SDL_Renderer * renderer, SDL_Rect * rect)
|
|||
CHECK_RENDERER_MAGIC(renderer, )
|
||||
|
||||
if (rect) {
|
||||
rect->x = (int)(renderer->clip_rect.x / renderer->scale.x);
|
||||
rect->y = (int)(renderer->clip_rect.y / renderer->scale.y);
|
||||
rect->w = (int)(renderer->clip_rect.w / renderer->scale.x);
|
||||
rect->h = (int)(renderer->clip_rect.h / renderer->scale.y);
|
||||
rect->x = (int)SDL_floor(renderer->clip_rect.x / renderer->scale.x);
|
||||
rect->y = (int)SDL_floor(renderer->clip_rect.y / renderer->scale.y);
|
||||
rect->w = (int)SDL_floor(renderer->clip_rect.w / renderer->scale.x);
|
||||
rect->h = (int)SDL_floor(renderer->clip_rect.h / renderer->scale.y);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2727,7 +2738,7 @@ SDL_RenderDrawPointsF(SDL_Renderer * renderer,
|
|||
CHECK_RENDERER_MAGIC(renderer, -1);
|
||||
|
||||
if (!points) {
|
||||
return SDL_SetError("SDL_RenderDrawFPoints(): Passed NULL points");
|
||||
return SDL_SetError("SDL_RenderDrawPointsF(): Passed NULL points");
|
||||
}
|
||||
if (count < 1) {
|
||||
return 0;
|
||||
|
@ -2929,31 +2940,29 @@ SDL_RenderDrawLines(SDL_Renderer * renderer,
|
|||
if (!fpoints) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
fpoints[i].x = points[i].x * renderer->scale.x;
|
||||
fpoints[i].y = points[i].y * renderer->scale.y;
|
||||
fpoints[i].x = points[i].x;
|
||||
fpoints[i].y = points[i].y;
|
||||
}
|
||||
|
||||
retval = QueueCmdDrawLines(renderer, fpoints, count);
|
||||
retval = SDL_RenderDrawLinesF(renderer, fpoints, count);
|
||||
|
||||
SDL_small_free(fpoints, isstack);
|
||||
|
||||
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
|
||||
return retval;
|
||||
}
|
||||
|
||||
int
|
||||
SDL_RenderDrawLinesF(SDL_Renderer * renderer,
|
||||
const SDL_FPoint * points, int count)
|
||||
{
|
||||
SDL_FPoint *fpoints;
|
||||
int i;
|
||||
int retval;
|
||||
SDL_bool isstack;
|
||||
|
||||
CHECK_RENDERER_MAGIC(renderer, -1);
|
||||
|
||||
if (!points) {
|
||||
return SDL_SetError("SDL_RenderDrawLines(): Passed NULL points");
|
||||
return SDL_SetError("SDL_RenderDrawLinesF(): Passed NULL points");
|
||||
}
|
||||
if (count < 2) {
|
||||
return 0;
|
||||
|
@ -2970,18 +2979,7 @@ SDL_RenderDrawLinesF(SDL_Renderer * renderer,
|
|||
return RenderDrawLinesWithRectsF(renderer, points, count);
|
||||
}
|
||||
|
||||
fpoints = SDL_small_alloc(SDL_FPoint, count, &isstack);
|
||||
if (!fpoints) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
for (i = 0; i < count; ++i) {
|
||||
fpoints[i].x = points[i].x * renderer->scale.x;
|
||||
fpoints[i].y = points[i].y * renderer->scale.y;
|
||||
}
|
||||
|
||||
retval = QueueCmdDrawLines(renderer, fpoints, count);
|
||||
|
||||
SDL_small_free(fpoints, isstack);
|
||||
retval = QueueCmdDrawLines(renderer, points, count);
|
||||
|
||||
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
|
||||
}
|
||||
|
@ -4069,10 +4067,10 @@ SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
|
|||
format = SDL_GetWindowPixelFormat(renderer->window);
|
||||
}
|
||||
|
||||
real_rect.x = renderer->viewport.x;
|
||||
real_rect.y = renderer->viewport.y;
|
||||
real_rect.w = renderer->viewport.w;
|
||||
real_rect.h = renderer->viewport.h;
|
||||
real_rect.x = (int)SDL_floor(renderer->viewport.x);
|
||||
real_rect.y = (int)SDL_floor(renderer->viewport.y);
|
||||
real_rect.w = (int)SDL_floor(renderer->viewport.w);
|
||||
real_rect.h = (int)SDL_floor(renderer->viewport.h);
|
||||
if (rect) {
|
||||
if (!SDL_IntersectRect(rect, &real_rect, &real_rect)) {
|
||||
return 0;
|
||||
|
|
12
externals/SDL/src/render/SDL_sysrender.h
vendored
12
externals/SDL/src/render/SDL_sysrender.h
vendored
|
@ -186,12 +186,12 @@ struct SDL_Renderer
|
|||
SDL_bool integer_scale;
|
||||
|
||||
/* The drawable area within the window */
|
||||
SDL_Rect viewport;
|
||||
SDL_Rect viewport_backup;
|
||||
SDL_FRect viewport;
|
||||
SDL_FRect viewport_backup;
|
||||
|
||||
/* The clip rectangle within the window */
|
||||
SDL_Rect clip_rect;
|
||||
SDL_Rect clip_rect_backup;
|
||||
SDL_FRect clip_rect;
|
||||
SDL_FRect clip_rect_backup;
|
||||
|
||||
/* Wether or not the clipping rectangle is used. */
|
||||
SDL_bool clipping_enabled;
|
||||
|
@ -226,8 +226,8 @@ struct SDL_Renderer
|
|||
SDL_RenderCommand *render_commands_pool;
|
||||
Uint32 render_command_generation;
|
||||
Uint32 last_queued_color;
|
||||
SDL_Rect last_queued_viewport;
|
||||
SDL_Rect last_queued_cliprect;
|
||||
SDL_FRect last_queued_viewport;
|
||||
SDL_FRect last_queued_cliprect;
|
||||
SDL_bool last_queued_cliprect_enabled;
|
||||
SDL_bool color_queued;
|
||||
SDL_bool viewport_queued;
|
||||
|
|
|
@ -700,7 +700,10 @@ D3D11_GetRotationForCurrentRenderTarget(SDL_Renderer * renderer)
|
|||
static int
|
||||
D3D11_GetViewportAlignedD3DRect(SDL_Renderer * renderer, const SDL_Rect * sdlRect, D3D11_RECT * outRect, BOOL includeViewportOffset)
|
||||
{
|
||||
D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata;
|
||||
const int rotation = D3D11_GetRotationForCurrentRenderTarget(renderer);
|
||||
const SDL_Rect *viewport = &data->currentViewport;
|
||||
|
||||
switch (rotation) {
|
||||
case DXGI_MODE_ROTATION_IDENTITY:
|
||||
outRect->left = sdlRect->x;
|
||||
|
@ -708,27 +711,27 @@ D3D11_GetViewportAlignedD3DRect(SDL_Renderer * renderer, const SDL_Rect * sdlRec
|
|||
outRect->top = sdlRect->y;
|
||||
outRect->bottom = sdlRect->y + sdlRect->h;
|
||||
if (includeViewportOffset) {
|
||||
outRect->left += renderer->viewport.x;
|
||||
outRect->right += renderer->viewport.x;
|
||||
outRect->top += renderer->viewport.y;
|
||||
outRect->bottom += renderer->viewport.y;
|
||||
outRect->left += viewport->x;
|
||||
outRect->right += viewport->x;
|
||||
outRect->top += viewport->y;
|
||||
outRect->bottom += viewport->y;
|
||||
}
|
||||
break;
|
||||
case DXGI_MODE_ROTATION_ROTATE270:
|
||||
outRect->left = sdlRect->y;
|
||||
outRect->right = sdlRect->y + sdlRect->h;
|
||||
outRect->top = renderer->viewport.w - sdlRect->x - sdlRect->w;
|
||||
outRect->bottom = renderer->viewport.w - sdlRect->x;
|
||||
outRect->top = viewport->w - sdlRect->x - sdlRect->w;
|
||||
outRect->bottom = viewport->w - sdlRect->x;
|
||||
break;
|
||||
case DXGI_MODE_ROTATION_ROTATE180:
|
||||
outRect->left = renderer->viewport.w - sdlRect->x - sdlRect->w;
|
||||
outRect->right = renderer->viewport.w - sdlRect->x;
|
||||
outRect->top = renderer->viewport.h - sdlRect->y - sdlRect->h;
|
||||
outRect->bottom = renderer->viewport.h - sdlRect->y;
|
||||
outRect->left = viewport->w - sdlRect->x - sdlRect->w;
|
||||
outRect->right = viewport->w - sdlRect->x;
|
||||
outRect->top = viewport->h - sdlRect->y - sdlRect->h;
|
||||
outRect->bottom = viewport->h - sdlRect->y;
|
||||
break;
|
||||
case DXGI_MODE_ROTATION_ROTATE90:
|
||||
outRect->left = renderer->viewport.h - sdlRect->y - sdlRect->h;
|
||||
outRect->right = renderer->viewport.h - sdlRect->y;
|
||||
outRect->left = viewport->h - sdlRect->y - sdlRect->h;
|
||||
outRect->right = viewport->h - sdlRect->y;
|
||||
outRect->top = sdlRect->x;
|
||||
outRect->bottom = sdlRect->x + sdlRect->h;
|
||||
break;
|
||||
|
|
76
externals/SDL/src/render/psp/SDL_render_psp.c
vendored
76
externals/SDL/src/render/psp/SDL_render_psp.c
vendored
|
@ -165,11 +165,10 @@ void Swap(float *a, float *b)
|
|||
static int
|
||||
TextureNextPow2(unsigned int w)
|
||||
{
|
||||
unsigned int n = 2;
|
||||
if(w == 0)
|
||||
return 0;
|
||||
|
||||
unsigned int n = 2;
|
||||
|
||||
while(w > n)
|
||||
n <<= 1;
|
||||
|
||||
|
@ -209,30 +208,32 @@ StartDrawing(SDL_Renderer * renderer)
|
|||
int
|
||||
TextureSwizzle(PSP_TextureData *psp_texture)
|
||||
{
|
||||
int bytewidth, height;
|
||||
int rowblocks, rowblocksadd;
|
||||
int i, j;
|
||||
unsigned int blockaddress = 0;
|
||||
unsigned int *src = NULL;
|
||||
unsigned char *data = NULL;
|
||||
|
||||
if(psp_texture->swizzled)
|
||||
return 1;
|
||||
|
||||
int bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3);
|
||||
int height = psp_texture->size / bytewidth;
|
||||
bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3);
|
||||
height = psp_texture->size / bytewidth;
|
||||
|
||||
int rowblocks = (bytewidth>>4);
|
||||
int rowblocksadd = (rowblocks-1)<<7;
|
||||
unsigned int blockaddress = 0;
|
||||
unsigned int *src = (unsigned int*) psp_texture->data;
|
||||
rowblocks = (bytewidth>>4);
|
||||
rowblocksadd = (rowblocks-1)<<7;
|
||||
|
||||
src = (unsigned int*) psp_texture->data;
|
||||
|
||||
unsigned char *data = NULL;
|
||||
data = SDL_malloc(psp_texture->size);
|
||||
|
||||
int j;
|
||||
|
||||
for(j = 0; j < height; j++, blockaddress += 16)
|
||||
{
|
||||
unsigned int *block;
|
||||
|
||||
block = (unsigned int*)&data[blockaddress];
|
||||
|
||||
int i;
|
||||
|
||||
for(i = 0; i < rowblocks; i++)
|
||||
{
|
||||
*block++ = *src++;
|
||||
|
@ -254,23 +255,28 @@ TextureSwizzle(PSP_TextureData *psp_texture)
|
|||
}
|
||||
int TextureUnswizzle(PSP_TextureData *psp_texture)
|
||||
{
|
||||
int bytewidth, height;
|
||||
int widthblocks, heightblocks;
|
||||
int dstpitch, dstrow;
|
||||
int blockx, blocky;
|
||||
int j;
|
||||
unsigned int *src = NULL;
|
||||
unsigned char *data = NULL;
|
||||
unsigned char *ydst = NULL;
|
||||
|
||||
if(!psp_texture->swizzled)
|
||||
return 1;
|
||||
|
||||
int blockx, blocky;
|
||||
bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3);
|
||||
height = psp_texture->size / bytewidth;
|
||||
|
||||
int bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3);
|
||||
int height = psp_texture->size / bytewidth;
|
||||
widthblocks = bytewidth/16;
|
||||
heightblocks = height/8;
|
||||
|
||||
int widthblocks = bytewidth/16;
|
||||
int heightblocks = height/8;
|
||||
dstpitch = (bytewidth - 16)/4;
|
||||
dstrow = bytewidth * 8;
|
||||
|
||||
int dstpitch = (bytewidth - 16)/4;
|
||||
int dstrow = bytewidth * 8;
|
||||
|
||||
unsigned int *src = (unsigned int*) psp_texture->data;
|
||||
|
||||
unsigned char *data = NULL;
|
||||
src = (unsigned int*) psp_texture->data;
|
||||
|
||||
data = SDL_malloc(psp_texture->size);
|
||||
|
||||
|
@ -279,9 +285,7 @@ int TextureUnswizzle(PSP_TextureData *psp_texture)
|
|||
|
||||
sceKernelDcacheWritebackAll();
|
||||
|
||||
int j;
|
||||
|
||||
unsigned char *ydst = (unsigned char *)data;
|
||||
ydst = (unsigned char *)data;
|
||||
|
||||
for(blocky = 0; blocky < heightblocks; ++blocky)
|
||||
{
|
||||
|
@ -655,7 +659,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex
|
|||
|
||||
cmd->data.draw.count = count;
|
||||
|
||||
verts = (VertTV *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertTV), 4, &cmd->data.draw.first);
|
||||
verts = (VertTV *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (VertTV), 4, &cmd->data.draw.first);
|
||||
if (!verts) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -673,6 +677,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex
|
|||
verts->x = curX;
|
||||
verts->y = y;
|
||||
verts->z = 0;
|
||||
verts++;
|
||||
|
||||
curU += sourceWidth;
|
||||
curX += polyWidth;
|
||||
|
@ -682,6 +687,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex
|
|||
verts->x = curX;
|
||||
verts->y = (y + height);
|
||||
verts->z = 0;
|
||||
verts++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -701,6 +707,7 @@ PSP_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * t
|
|||
const float width = dstrect->w - centerx;
|
||||
const float height = dstrect->h - centery;
|
||||
float s, c;
|
||||
float cw, sw, ch, sh;
|
||||
|
||||
float u0 = srcrect->x;
|
||||
float v0 = srcrect->y;
|
||||
|
@ -708,6 +715,7 @@ PSP_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * t
|
|||
float v1 = srcrect->y + srcrect->h;
|
||||
|
||||
|
||||
|
||||
if (!verts) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -716,10 +724,10 @@ PSP_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * t
|
|||
|
||||
MathSincos(degToRad(angle), &s, &c);
|
||||
|
||||
const float cw = c * width;
|
||||
const float sw = s * width;
|
||||
const float ch = c * height;
|
||||
const float sh = s * height;
|
||||
cw = c * width;
|
||||
sw = s * width;
|
||||
ch = c * height;
|
||||
sh = s * height;
|
||||
|
||||
if (flip & SDL_FLIP_VERTICAL) {
|
||||
Swap(&v0, &v1);
|
||||
|
@ -799,7 +807,7 @@ static int
|
|||
PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
|
||||
{
|
||||
PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata;
|
||||
|
||||
Uint8 *gpumem = NULL;
|
||||
StartDrawing(renderer);
|
||||
|
||||
/* note that before the renderer interface change, this would do extrememly small
|
||||
|
@ -808,7 +816,7 @@ PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
|||
I don't know what the limits on PSP hardware are. It might be useful to have
|
||||
rendering backends report a reasonable maximum, so the higher level can flush
|
||||
if we appear to be exceeding that. */
|
||||
Uint8 *gpumem = (Uint8 *) sceGuGetMemory(vertsize);
|
||||
gpumem = (Uint8 *) sceGuGetMemory(vertsize);
|
||||
if (!gpumem) {
|
||||
return SDL_SetError("Couldn't obtain a %d-byte vertex buffer!", (int) vertsize);
|
||||
}
|
||||
|
|
149
externals/SDL/src/render/software/SDL_render_sw.c
vendored
149
externals/SDL/src/render/software/SDL_render_sw.c
vendored
|
@ -214,18 +214,9 @@ SW_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FP
|
|||
|
||||
cmd->data.draw.count = count;
|
||||
|
||||
if (renderer->viewport.x || renderer->viewport.y) {
|
||||
const int x = renderer->viewport.x;
|
||||
const int y = renderer->viewport.y;
|
||||
for (i = 0; i < count; i++, verts++, points++) {
|
||||
verts->x = (int)(x + points->x);
|
||||
verts->y = (int)(y + points->y);
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < count; i++, verts++, points++) {
|
||||
verts->x = (int)points->x;
|
||||
verts->y = (int)points->y;
|
||||
}
|
||||
for (i = 0; i < count; i++, verts++, points++) {
|
||||
verts->x = (int)points->x;
|
||||
verts->y = (int)points->y;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -243,23 +234,11 @@ SW_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRe
|
|||
|
||||
cmd->data.draw.count = count;
|
||||
|
||||
if (renderer->viewport.x || renderer->viewport.y) {
|
||||
const int x = renderer->viewport.x;
|
||||
const int y = renderer->viewport.y;
|
||||
|
||||
for (i = 0; i < count; i++, verts++, rects++) {
|
||||
verts->x = (int)(x + rects->x);
|
||||
verts->y = (int)(y + rects->y);
|
||||
verts->w = SDL_max((int)rects->w, 1);
|
||||
verts->h = SDL_max((int)rects->h, 1);
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < count; i++, verts++, rects++) {
|
||||
verts->x = (int)rects->x;
|
||||
verts->y = (int)rects->y;
|
||||
verts->w = SDL_max((int)rects->w, 1);
|
||||
verts->h = SDL_max((int)rects->h, 1);
|
||||
}
|
||||
for (i = 0; i < count; i++, verts++, rects++) {
|
||||
verts->x = (int)rects->x;
|
||||
verts->y = (int)rects->y;
|
||||
verts->w = SDL_max((int)rects->w, 1);
|
||||
verts->h = SDL_max((int)rects->h, 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -280,13 +259,8 @@ SW_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * text
|
|||
SDL_memcpy(verts, srcrect, sizeof (SDL_Rect));
|
||||
verts++;
|
||||
|
||||
if (renderer->viewport.x || renderer->viewport.y) {
|
||||
verts->x = (int)(renderer->viewport.x + dstrect->x);
|
||||
verts->y = (int)(renderer->viewport.y + dstrect->y);
|
||||
} else {
|
||||
verts->x = (int)dstrect->x;
|
||||
verts->y = (int)dstrect->y;
|
||||
}
|
||||
verts->x = (int)dstrect->x;
|
||||
verts->y = (int)dstrect->y;
|
||||
verts->w = (int)dstrect->w;
|
||||
verts->h = (int)dstrect->h;
|
||||
|
||||
|
@ -317,13 +291,8 @@ SW_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * te
|
|||
|
||||
SDL_memcpy(&verts->srcrect, srcrect, sizeof (SDL_Rect));
|
||||
|
||||
if (renderer->viewport.x || renderer->viewport.y) {
|
||||
verts->dstrect.x = (int)(renderer->viewport.x + dstrect->x);
|
||||
verts->dstrect.y = (int)(renderer->viewport.y + dstrect->y);
|
||||
} else {
|
||||
verts->dstrect.x = (int)dstrect->x;
|
||||
verts->dstrect.y = (int)dstrect->y;
|
||||
}
|
||||
verts->dstrect.x = (int)dstrect->x;
|
||||
verts->dstrect.y = (int)dstrect->y;
|
||||
verts->dstrect.w = (int)dstrect->w;
|
||||
verts->dstrect.h = (int)dstrect->h;
|
||||
verts->angle = angle;
|
||||
|
@ -618,8 +587,8 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te
|
|||
ptr->src.x = (int)(uv_[0] * texture->w);
|
||||
ptr->src.y = (int)(uv_[1] * texture->h);
|
||||
|
||||
ptr->dst.x = (int)(xy_[0] * scale_x + renderer->viewport.x);
|
||||
ptr->dst.y = (int)(xy_[1] * scale_y + renderer->viewport.y);
|
||||
ptr->dst.x = (int)(xy_[0] * scale_x);
|
||||
ptr->dst.y = (int)(xy_[1] * scale_y);
|
||||
trianglepoint_2_fixedpoint(&ptr->dst);
|
||||
|
||||
ptr->color = col_;
|
||||
|
@ -646,8 +615,8 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te
|
|||
xy_ = (float *)((char*)xy + j * xy_stride);
|
||||
col_ = *(SDL_Color *)((char*)color + j * color_stride);
|
||||
|
||||
ptr->dst.x = (int)(xy_[0] * scale_x + renderer->viewport.x);
|
||||
ptr->dst.y = (int)(xy_[1] * scale_y + renderer->viewport.y);
|
||||
ptr->dst.x = (int)(xy_[0] * scale_x);
|
||||
ptr->dst.y = (int)(xy_[1] * scale_y);
|
||||
trianglepoint_2_fixedpoint(&ptr->dst);
|
||||
|
||||
ptr->color = col_;
|
||||
|
@ -755,9 +724,19 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
|
|||
const Uint8 b = cmd->data.draw.b;
|
||||
const Uint8 a = cmd->data.draw.a;
|
||||
const int count = (int) cmd->data.draw.count;
|
||||
const SDL_Point *verts = (SDL_Point *) (((Uint8 *) vertices) + cmd->data.draw.first);
|
||||
SDL_Point *verts = (SDL_Point *) (((Uint8 *) vertices) + cmd->data.draw.first);
|
||||
const SDL_BlendMode blend = cmd->data.draw.blend;
|
||||
SetDrawState(surface, &drawstate);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport->x || drawstate.viewport->y) {
|
||||
int i;
|
||||
for (i = 0; i < count; i++) {
|
||||
verts[i].x += drawstate.viewport->x;
|
||||
verts[i].y += drawstate.viewport->y;
|
||||
}
|
||||
}
|
||||
|
||||
if (blend == SDL_BLENDMODE_NONE) {
|
||||
SDL_DrawPoints(surface, verts, count, SDL_MapRGBA(surface->format, r, g, b, a));
|
||||
} else {
|
||||
|
@ -772,9 +751,19 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
|
|||
const Uint8 b = cmd->data.draw.b;
|
||||
const Uint8 a = cmd->data.draw.a;
|
||||
const int count = (int) cmd->data.draw.count;
|
||||
const SDL_Point *verts = (SDL_Point *) (((Uint8 *) vertices) + cmd->data.draw.first);
|
||||
SDL_Point *verts = (SDL_Point *) (((Uint8 *) vertices) + cmd->data.draw.first);
|
||||
const SDL_BlendMode blend = cmd->data.draw.blend;
|
||||
SetDrawState(surface, &drawstate);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport->x || drawstate.viewport->y) {
|
||||
int i;
|
||||
for (i = 0; i < count; i++) {
|
||||
verts[i].x += drawstate.viewport->x;
|
||||
verts[i].y += drawstate.viewport->y;
|
||||
}
|
||||
}
|
||||
|
||||
if (blend == SDL_BLENDMODE_NONE) {
|
||||
SDL_DrawLines(surface, verts, count, SDL_MapRGBA(surface->format, r, g, b, a));
|
||||
} else {
|
||||
|
@ -789,9 +778,19 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
|
|||
const Uint8 b = cmd->data.draw.b;
|
||||
const Uint8 a = cmd->data.draw.a;
|
||||
const int count = (int) cmd->data.draw.count;
|
||||
const SDL_Rect *verts = (SDL_Rect *) (((Uint8 *) vertices) + cmd->data.draw.first);
|
||||
SDL_Rect *verts = (SDL_Rect *) (((Uint8 *) vertices) + cmd->data.draw.first);
|
||||
const SDL_BlendMode blend = cmd->data.draw.blend;
|
||||
SetDrawState(surface, &drawstate);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport->x || drawstate.viewport->y) {
|
||||
int i;
|
||||
for (i = 0; i < count; i++) {
|
||||
verts[i].x += drawstate.viewport->x;
|
||||
verts[i].y += drawstate.viewport->y;
|
||||
}
|
||||
}
|
||||
|
||||
if (blend == SDL_BLENDMODE_NONE) {
|
||||
SDL_FillRects(surface, verts, count, SDL_MapRGBA(surface->format, r, g, b, a));
|
||||
} else {
|
||||
|
@ -811,6 +810,12 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
|
|||
|
||||
PrepTextureForCopy(cmd);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport->x || drawstate.viewport->y) {
|
||||
dstrect->x += drawstate.viewport->x;
|
||||
dstrect->y += drawstate.viewport->y;
|
||||
}
|
||||
|
||||
if ( srcrect->w == dstrect->w && srcrect->h == dstrect->h ) {
|
||||
SDL_BlitSurface(src, srcrect, surface, dstrect);
|
||||
} else {
|
||||
|
@ -824,9 +829,16 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
|
|||
}
|
||||
|
||||
case SDL_RENDERCMD_COPY_EX: {
|
||||
const CopyExData *copydata = (CopyExData *) (((Uint8 *) vertices) + cmd->data.draw.first);
|
||||
CopyExData *copydata = (CopyExData *) (((Uint8 *) vertices) + cmd->data.draw.first);
|
||||
SetDrawState(surface, &drawstate);
|
||||
PrepTextureForCopy(cmd);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport->x || drawstate.viewport->y) {
|
||||
copydata->dstrect.x += drawstate.viewport->x;
|
||||
copydata->dstrect.y += drawstate.viewport->y;
|
||||
}
|
||||
|
||||
SW_RenderCopyEx(renderer, surface, cmd->data.draw.texture, ©data->srcrect,
|
||||
©data->dstrect, copydata->angle, ©data->center, copydata->flip);
|
||||
break;
|
||||
|
@ -847,6 +859,19 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
|
|||
GeometryCopyData *ptr = (GeometryCopyData *) verts;
|
||||
|
||||
PrepTextureForCopy(cmd);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport->x || drawstate.viewport->y) {
|
||||
SDL_Point vp;
|
||||
vp.x = drawstate.viewport->x;
|
||||
vp.y = drawstate.viewport->y;
|
||||
trianglepoint_2_fixedpoint(&vp);
|
||||
for (i = 0; i < count; i++) {
|
||||
ptr[i].dst.x += vp.x;
|
||||
ptr[i].dst.y += vp.y;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i += 3, ptr += 3) {
|
||||
SDL_SW_BlitTriangle(
|
||||
src,
|
||||
|
@ -857,6 +882,19 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
|
|||
}
|
||||
} else {
|
||||
GeometryFillData *ptr = (GeometryFillData *) verts;
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport->x || drawstate.viewport->y) {
|
||||
SDL_Point vp;
|
||||
vp.x = drawstate.viewport->x;
|
||||
vp.y = drawstate.viewport->y;
|
||||
trianglepoint_2_fixedpoint(&vp);
|
||||
for (i = 0; i < count; i++) {
|
||||
ptr[i].dst.x += vp.x;
|
||||
ptr[i].dst.y += vp.y;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i += 3, ptr += 3) {
|
||||
SDL_SW_FillTriangle(surface, &(ptr[0].dst), &(ptr[1].dst), &(ptr[2].dst), blend, ptr[0].color, ptr[1].color, ptr[2].color);
|
||||
}
|
||||
|
@ -992,17 +1030,24 @@ SW_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
{
|
||||
const char *hint;
|
||||
SDL_Surface *surface;
|
||||
SDL_bool no_hint_set;
|
||||
|
||||
/* Set the vsync hint based on our flags, if it's not already set */
|
||||
hint = SDL_GetHint(SDL_HINT_RENDER_VSYNC);
|
||||
if (!hint || !*hint) {
|
||||
no_hint_set = SDL_TRUE;
|
||||
} else {
|
||||
no_hint_set = SDL_FALSE;
|
||||
}
|
||||
|
||||
if (no_hint_set) {
|
||||
SDL_SetHint(SDL_HINT_RENDER_VSYNC, (flags & SDL_RENDERER_PRESENTVSYNC) ? "1" : "0");
|
||||
}
|
||||
|
||||
surface = SDL_GetWindowSurface(window);
|
||||
|
||||
/* Reset the vsync hint if we set it above */
|
||||
if (!hint || !*hint) {
|
||||
if (no_hint_set) {
|
||||
SDL_SetHint(SDL_HINT_RENDER_VSYNC, "");
|
||||
}
|
||||
|
||||
|
|
6
externals/SDL/src/stdlib/SDL_iconv.c
vendored
6
externals/SDL/src/stdlib/SDL_iconv.c
vendored
|
@ -146,7 +146,7 @@ static struct
|
|||
{ "US-ASCII", ENCODING_ASCII },
|
||||
{ "8859-1", ENCODING_LATIN1 },
|
||||
{ "ISO-8859-1", ENCODING_LATIN1 },
|
||||
#ifdef __WIN32__
|
||||
#if defined(__WIN32__) || defined(__OS2__)
|
||||
{ "WCHAR_T", ENCODING_UTF16LE },
|
||||
#else
|
||||
{ "WCHAR_T", ENCODING_UCS4NATIVE },
|
||||
|
@ -867,6 +867,7 @@ SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf,
|
|||
stringsize *= 2;
|
||||
string = (char *) SDL_realloc(string, stringsize);
|
||||
if (!string) {
|
||||
SDL_free(oldstring);
|
||||
SDL_iconv_close(cd);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -887,8 +888,7 @@ SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf,
|
|||
break;
|
||||
}
|
||||
/* Avoid infinite loops when nothing gets converted */
|
||||
if (oldinbytesleft == inbytesleft)
|
||||
{
|
||||
if (oldinbytesleft == inbytesleft) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
8
externals/SDL/src/test/SDL_test_common.c
vendored
8
externals/SDL/src/test/SDL_test_common.c
vendored
|
@ -1292,7 +1292,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
|
|||
SDL_GetWindowSize(state->windows[i], &w, &h);
|
||||
if (!(state->window_flags & SDL_WINDOW_RESIZABLE) &&
|
||||
(w != state->window_w || h != state->window_h)) {
|
||||
printf("Window requested size %dx%d, got %dx%d\n", state->window_w, state->window_h, w, h);
|
||||
SDL_Log("Window requested size %dx%d, got %dx%d\n", state->window_w, state->window_h, w, h);
|
||||
state->window_w = w;
|
||||
state->window_h = h;
|
||||
}
|
||||
|
@ -1970,7 +1970,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
|
|||
if (withControl) {
|
||||
/* Ctrl-C copy awesome text! */
|
||||
SDL_SetClipboardText("SDL rocks!\nYou know it!");
|
||||
printf("Copied text to clipboard\n");
|
||||
SDL_Log("Copied text to clipboard\n");
|
||||
}
|
||||
if (withAlt) {
|
||||
/* Alt-C toggle a render clip rectangle */
|
||||
|
@ -2006,9 +2006,9 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
|
|||
/* Ctrl-V paste awesome text! */
|
||||
char *text = SDL_GetClipboardText();
|
||||
if (*text) {
|
||||
printf("Clipboard: %s\n", text);
|
||||
SDL_Log("Clipboard: %s\n", text);
|
||||
} else {
|
||||
printf("Clipboard is empty\n");
|
||||
SDL_Log("Clipboard is empty\n");
|
||||
}
|
||||
SDL_free(text);
|
||||
}
|
||||
|
|
4
externals/SDL/src/timer/psp/SDL_systimer.c
vendored
4
externals/SDL/src/timer/psp/SDL_systimer.c
vendored
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef SDL_TIMERS_PSP
|
||||
#ifdef SDL_TIMER_PSP
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_timer.h"
|
||||
|
@ -84,7 +84,7 @@ void SDL_Delay(Uint32 ms)
|
|||
sceKernelDelayThreadCB(ms * 1000);
|
||||
}
|
||||
|
||||
#endif /* SDL_TIMERS_PSP */
|
||||
#endif /* SDL_TIMER_PSP */
|
||||
|
||||
/* vim: ts=4 sw=4
|
||||
*/
|
||||
|
|
4
externals/SDL/src/video/SDL_pixels.c
vendored
4
externals/SDL/src/video/SDL_pixels.c
vendored
|
@ -947,7 +947,7 @@ Map1to1(SDL_Palette * src, SDL_Palette * dst, int *identical)
|
|||
}
|
||||
*identical = 0;
|
||||
}
|
||||
map = (Uint8 *) SDL_malloc(src->ncolors);
|
||||
map = (Uint8 *) SDL_calloc(256, sizeof(Uint8));
|
||||
if (map == NULL) {
|
||||
SDL_OutOfMemory();
|
||||
return (NULL);
|
||||
|
@ -971,7 +971,7 @@ Map1toN(SDL_PixelFormat * src, Uint8 Rmod, Uint8 Gmod, Uint8 Bmod, Uint8 Amod,
|
|||
SDL_Palette *pal = src->palette;
|
||||
|
||||
bpp = ((dst->BytesPerPixel == 3) ? 4 : dst->BytesPerPixel);
|
||||
map = (Uint8 *) SDL_malloc(pal->ncolors * bpp);
|
||||
map = (Uint8 *) SDL_calloc(256, bpp);
|
||||
if (map == NULL) {
|
||||
SDL_OutOfMemory();
|
||||
return (NULL);
|
||||
|
|
22
externals/SDL/src/video/cocoa/SDL_cocoamouse.m
vendored
22
externals/SDL/src/video/cocoa/SDL_cocoamouse.m
vendored
|
@ -473,15 +473,19 @@ Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event)
|
|||
}
|
||||
}
|
||||
|
||||
if (x > 0) {
|
||||
x = SDL_ceil(x);
|
||||
} else if (x < 0) {
|
||||
x = SDL_floor(x);
|
||||
}
|
||||
if (y > 0) {
|
||||
y = SDL_ceil(y);
|
||||
} else if (y < 0) {
|
||||
y = SDL_floor(y);
|
||||
/* For discrete scroll events from conventional mice, always send a full tick.
|
||||
For continuous scroll events from trackpads, send fractional deltas for smoother scrolling. */
|
||||
if (![event respondsToSelector:@selector(hasPreciseScrollingDeltas)] || ![event hasPreciseScrollingDeltas]) {
|
||||
if (x > 0) {
|
||||
x = SDL_ceil(x);
|
||||
} else if (x < 0) {
|
||||
x = SDL_floor(x);
|
||||
}
|
||||
if (y > 0) {
|
||||
y = SDL_ceil(y);
|
||||
} else if (y < 0) {
|
||||
y = SDL_floor(y);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_SendMouseWheel(window, mouseID, x, y, direction);
|
||||
|
|
|
@ -109,7 +109,10 @@ Cocoa_GLES_SetupWindow(_THIS, SDL_Window * window)
|
|||
|
||||
|
||||
if (_this->egl_data == NULL) {
|
||||
/* !!! FIXME: commenting out this assertion is (I think) incorrect; figure out why driver_loaded is wrong for ANGLE instead. --ryan. */
|
||||
#if 0 /* When hint SDL_HINT_OPENGL_ES_DRIVER is set to "1" (e.g. for ANGLE support), _this->gl_config.driver_loaded can be 1, while the below lines function. */
|
||||
SDL_assert(!_this->gl_config.driver_loaded);
|
||||
#endif
|
||||
if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) {
|
||||
SDL_EGL_UnloadLibrary(_this);
|
||||
return -1;
|
||||
|
|
12
externals/SDL/src/video/kmsdrm/SDL_kmsdrmmouse.c
vendored
12
externals/SDL/src/video/kmsdrm/SDL_kmsdrmmouse.c
vendored
|
@ -73,6 +73,7 @@ KMSDRM_DestroyCursorBO (_THIS, SDL_VideoDisplay *display)
|
|||
if (dispdata->cursor_bo) {
|
||||
KMSDRM_gbm_bo_destroy(dispdata->cursor_bo);
|
||||
dispdata->cursor_bo = NULL;
|
||||
dispdata->cursor_bo_drm_fd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,6 +117,8 @@ KMSDRM_CreateCursorBO (SDL_VideoDisplay *display) {
|
|||
SDL_SetError("Could not create GBM cursor BO");
|
||||
return;
|
||||
}
|
||||
|
||||
dispdata->cursor_bo_drm_fd = viddata->drm_fd;
|
||||
}
|
||||
|
||||
/* Remove a cursor buffer from a display's DRM cursor BO. */
|
||||
|
@ -384,11 +387,9 @@ KMSDRM_WarpMouseGlobal(int x, int y)
|
|||
|
||||
/* And now update the cursor graphic position on screen. */
|
||||
if (dispdata->cursor_bo) {
|
||||
int drm_fd;
|
||||
int ret = 0;
|
||||
|
||||
drm_fd = KMSDRM_gbm_device_get_fd(KMSDRM_gbm_bo_get_device(dispdata->cursor_bo));
|
||||
ret = KMSDRM_drmModeMoveCursor(drm_fd, dispdata->crtc->crtc_id, x, y);
|
||||
ret = KMSDRM_drmModeMoveCursor(dispdata->cursor_bo_drm_fd, dispdata->crtc->crtc_id, x, y);
|
||||
|
||||
if (ret) {
|
||||
SDL_SetError("drmModeMoveCursor() failed.");
|
||||
|
@ -437,7 +438,6 @@ static void
|
|||
KMSDRM_MoveCursor(SDL_Cursor * cursor)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
int drm_fd;
|
||||
int ret = 0;
|
||||
|
||||
/* We must NOT call SDL_SendMouseMotion() here or we will enter recursivity!
|
||||
|
@ -452,9 +452,7 @@ KMSDRM_MoveCursor(SDL_Cursor * cursor)
|
|||
return;
|
||||
}
|
||||
|
||||
drm_fd = KMSDRM_gbm_device_get_fd(KMSDRM_gbm_bo_get_device(dispdata->cursor_bo));
|
||||
|
||||
ret = KMSDRM_drmModeMoveCursor(drm_fd, dispdata->crtc->crtc_id, mouse->x, mouse->y);
|
||||
ret = KMSDRM_drmModeMoveCursor(dispdata->cursor_bo_drm_fd, dispdata->crtc->crtc_id, mouse->x, mouse->y);
|
||||
|
||||
if (ret) {
|
||||
SDL_SetError("drmModeMoveCursor() failed.");
|
||||
|
|
|
@ -95,7 +95,6 @@ SDL_KMSDRM_SYM(int,drmModeSetPlane,(int fd, uint32_t plane_id, uint32_t crtc_id,
|
|||
/* Planes stuff ends. */
|
||||
|
||||
SDL_KMSDRM_MODULE(GBM)
|
||||
SDL_KMSDRM_SYM(int,gbm_device_get_fd,(struct gbm_device *gbm))
|
||||
SDL_KMSDRM_SYM(int,gbm_device_is_format_supported,(struct gbm_device *gbm,
|
||||
uint32_t format, uint32_t usage))
|
||||
SDL_KMSDRM_SYM(void,gbm_device_destroy,(struct gbm_device *gbm))
|
||||
|
|
|
@ -555,6 +555,7 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) {
|
|||
/* Initialize some of the members of the new display's driverdata
|
||||
to sane values. */
|
||||
dispdata->cursor_bo = NULL;
|
||||
dispdata->cursor_bo_drm_fd = -1;
|
||||
|
||||
/* Since we create and show the default cursor on KMSDRM_InitMouse(),
|
||||
and we call KMSDRM_InitMouse() when we create a window, we have to know
|
||||
|
|
|
@ -77,6 +77,7 @@ typedef struct SDL_DisplayData
|
|||
where we may not have an SDL_Cursor at all (so no SDL_Cursor driverdata).
|
||||
There's only one cursor GBM BO because we only support one cursor. */
|
||||
struct gbm_bo *cursor_bo;
|
||||
int cursor_bo_drm_fd;
|
||||
uint64_t cursor_w, cursor_h;
|
||||
|
||||
SDL_bool default_cursor_init;
|
||||
|
|
15
externals/SDL/src/video/os2/SDL_os2video.c
vendored
15
externals/SDL/src/video/os2/SDL_os2video.c
vendored
|
@ -320,10 +320,15 @@ static VOID _wmChar(WINDATA *pWinData, MPARAM mp1, MPARAM mp2)
|
|||
}
|
||||
|
||||
if ((ulFlags & KC_CHAR) != 0) {
|
||||
CHAR acUTF8[4];
|
||||
LONG lRC = StrUTF8(1, acUTF8, sizeof(acUTF8), (PSZ)&ulCharCode, 1);
|
||||
|
||||
SDL_SendKeyboardText((lRC > 0)? acUTF8 : (PSZ)&ulCharCode);
|
||||
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
|
||||
char *utf8 = SDL_iconv_string("UTF-8", "", (char *)&ulCharCode, 1);
|
||||
SDL_SendKeyboardText((utf8 && *utf8) ? utf8 : (char *)&ulCharCode);
|
||||
SDL_free(utf8);
|
||||
#else
|
||||
char utf8[4];
|
||||
int rc = StrUTF8(1, utf8, sizeof(utf8), (char *)&ulCharCode, 1);
|
||||
SDL_SendKeyboardText((rc > 0) ? utf8 : (char *) &ulCharCode);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -389,7 +394,7 @@ static MRESULT _wmDrop(WINDATA *pWinData, PDRAGINFO pDragInfo)
|
|||
{
|
||||
ULONG ulIdx;
|
||||
PDRAGITEM pDragItem;
|
||||
CHAR acFName[_MAX_PATH];
|
||||
CHAR acFName[CCHMAXPATH];
|
||||
PCHAR pcFName;
|
||||
|
||||
if (!DrgAccessDraginfo(pDragInfo))
|
||||
|
|
1
externals/SDL/src/video/psp/SDL_pspevents.c
vendored
1
externals/SDL/src/video/psp/SDL_pspevents.c
vendored
|
@ -34,6 +34,7 @@
|
|||
#include "SDL_keyboard.h"
|
||||
#include "../../thread/SDL_systhread.h"
|
||||
#include <psphprm.h>
|
||||
#include <pspthreadman.h>
|
||||
|
||||
#ifdef PSPIRKEYB
|
||||
#include <pspirkeyb.h>
|
||||
|
|
1
externals/SDL/src/video/psp/SDL_pspvideo.c
vendored
1
externals/SDL/src/video/psp/SDL_pspvideo.c
vendored
|
@ -214,6 +214,7 @@ PSP_CreateWindow(_THIS, SDL_Window * window)
|
|||
/* Setup driver data for this window */
|
||||
window->driverdata = wdata;
|
||||
|
||||
SDL_SetKeyboardFocus(window);
|
||||
|
||||
/* Window has been successfully created */
|
||||
return 0;
|
||||
|
|
|
@ -95,6 +95,8 @@ void SDL_WAYLAND_UnloadSymbols(void);
|
|||
#define wl_proxy_marshal_constructor_versioned (*WAYLAND_wl_proxy_marshal_constructor_versioned)
|
||||
#define wl_proxy_set_tag (*WAYLAND_wl_proxy_set_tag)
|
||||
#define wl_proxy_get_tag (*WAYLAND_wl_proxy_get_tag)
|
||||
#define wl_proxy_marshal_flags (*WAYLAND_wl_proxy_marshal_flags)
|
||||
#define wl_proxy_marshal_array_flags (*WAYLAND_wl_proxy_marshal_array_flags)
|
||||
|
||||
#define wl_seat_interface (*WAYLAND_wl_seat_interface)
|
||||
#define wl_surface_interface (*WAYLAND_wl_surface_interface)
|
||||
|
|
|
@ -66,6 +66,25 @@
|
|||
/* Weston uses a ratio of 10 units per scroll tick */
|
||||
#define WAYLAND_WHEEL_AXIS_UNIT 10
|
||||
|
||||
static const struct {
|
||||
xkb_keysym_t keysym;
|
||||
SDL_KeyCode keycode;
|
||||
} KeySymToSDLKeyCode[] = {
|
||||
{ XKB_KEY_Shift_L, SDLK_LSHIFT },
|
||||
{ XKB_KEY_Shift_R, SDLK_RSHIFT },
|
||||
{ XKB_KEY_Control_L, SDLK_LCTRL },
|
||||
{ XKB_KEY_Control_R, SDLK_RCTRL },
|
||||
{ XKB_KEY_Caps_Lock, SDLK_CAPSLOCK },
|
||||
{ XKB_KEY_Alt_L, SDLK_LALT },
|
||||
{ XKB_KEY_Alt_R, SDLK_RALT },
|
||||
{ XKB_KEY_Meta_L, SDLK_LGUI },
|
||||
{ XKB_KEY_Meta_R, SDLK_RGUI },
|
||||
{ XKB_KEY_Super_L, SDLK_LGUI },
|
||||
{ XKB_KEY_Super_R, SDLK_RGUI },
|
||||
{ XKB_KEY_Hyper_L, SDLK_LGUI },
|
||||
{ XKB_KEY_Hyper_R, SDLK_RGUI },
|
||||
};
|
||||
|
||||
struct SDL_WaylandTouchPoint {
|
||||
SDL_TouchID id;
|
||||
float x;
|
||||
|
@ -83,6 +102,19 @@ struct SDL_WaylandTouchPointList {
|
|||
|
||||
static struct SDL_WaylandTouchPointList touch_points = {NULL, NULL};
|
||||
|
||||
static SDL_KeyCode
|
||||
Wayland_KeySymToSDLKeyCode(xkb_keysym_t keysym)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SDL_arraysize(KeySymToSDLKeyCode); ++i) {
|
||||
if (keysym == KeySymToSDLKeyCode[i].keysym) {
|
||||
return KeySymToSDLKeyCode[i].keycode;
|
||||
}
|
||||
}
|
||||
return SDLK_UNKNOWN;
|
||||
}
|
||||
|
||||
static void
|
||||
touch_add(SDL_TouchID id, float x, float y, struct wl_surface *surface)
|
||||
{
|
||||
|
@ -969,6 +1001,11 @@ Wayland_keymap_iter(struct xkb_keymap *keymap, xkb_keycode_t key, void *data)
|
|||
|
||||
if (WAYLAND_xkb_keymap_key_get_syms_by_level(keymap, key, sdlKeymap->layout, 0, &syms) > 0) {
|
||||
uint32_t keycode = SDL_KeySymToUcs4(syms[0]);
|
||||
|
||||
if (!keycode) {
|
||||
keycode = Wayland_KeySymToSDLKeyCode(syms[0]);
|
||||
}
|
||||
|
||||
if (keycode) {
|
||||
sdlKeymap->keymap[scancode] = keycode;
|
||||
} else {
|
||||
|
|
|
@ -84,6 +84,10 @@ SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_18)
|
|||
SDL_WAYLAND_SYM(void, wl_proxy_set_tag, (struct wl_proxy *, const char * const *))
|
||||
SDL_WAYLAND_SYM(const char * const *, wl_proxy_get_tag, (struct wl_proxy *))
|
||||
|
||||
SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_20)
|
||||
SDL_WAYLAND_SYM(struct wl_proxy*, wl_proxy_marshal_flags, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interfac, uint32_t version, uint32_t flags, ...))
|
||||
SDL_WAYLAND_SYM(struct wl_proxy*, wl_proxy_marshal_array_flags, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, uint32_t flags, union wl_argument *args))
|
||||
|
||||
SDL_WAYLAND_INTERFACE(wl_seat_interface)
|
||||
SDL_WAYLAND_INTERFACE(wl_surface_interface)
|
||||
SDL_WAYLAND_INTERFACE(wl_shm_pool_interface)
|
||||
|
|
|
@ -290,8 +290,10 @@ handle_configure_xdg_toplevel(void *data,
|
|||
/* For fullscreen, foolishly do what the compositor says. If it's wrong,
|
||||
* don't blame us, we were explicitly instructed to do this.
|
||||
*/
|
||||
window->w = width;
|
||||
window->h = height;
|
||||
if (width != 0 && height != 0) {
|
||||
window->w = width;
|
||||
window->h = height;
|
||||
}
|
||||
|
||||
/* This part is good though. */
|
||||
if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
|
||||
|
|
|
@ -109,7 +109,7 @@ WIN_GLES_SetupWindow(_THIS, SDL_Window * window)
|
|||
|
||||
if (_this->egl_data == NULL) {
|
||||
/* !!! FIXME: commenting out this assertion is (I think) incorrect; figure out why driver_loaded is wrong for ANGLE instead. --ryan. */
|
||||
#if 0 /* When hint SDL_HINT_OPENGL_ES_DRIVER is set to "1" (e.g. for ANGLE support), _this->gl_config.driver_loaded can be 0, while the below lines function. */
|
||||
#if 0 /* When hint SDL_HINT_OPENGL_ES_DRIVER is set to "1" (e.g. for ANGLE support), _this->gl_config.driver_loaded can be 1, while the below lines function. */
|
||||
SDL_assert(!_this->gl_config.driver_loaded);
|
||||
#endif
|
||||
if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) {
|
||||
|
|
|
@ -115,6 +115,7 @@ X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format,
|
|||
shmdt(shminfo->shmaddr);
|
||||
} else {
|
||||
/* Done! */
|
||||
data->ximage->byte_order = (SDL_BYTEORDER == SDL_BIG_ENDIAN) ? MSBFirst : LSBFirst;
|
||||
data->use_mitshm = SDL_TRUE;
|
||||
*pixels = shminfo->shmaddr;
|
||||
return 0;
|
||||
|
@ -135,6 +136,7 @@ X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format,
|
|||
SDL_free(*pixels);
|
||||
return SDL_SetError("Couldn't create XImage");
|
||||
}
|
||||
data->ximage->byte_order = (SDL_BYTEORDER == SDL_BIG_ENDIAN) ? MSBFirst : LSBFirst;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
2
externals/SDL/src/video/x11/SDL_x11sym.h
vendored
2
externals/SDL/src/video/x11/SDL_x11sym.h
vendored
|
@ -163,7 +163,7 @@ SDL_X11_SYM(Status,XmbTextListToTextProperty,(Display* a,char** b,int c,XICCEnco
|
|||
SDL_X11_MODULE(XFIXES)
|
||||
SDL_X11_SYM(PointerBarrier, XFixesCreatePointerBarrier, (Display* a, Window b, int c, int d, int e, int f, int g, int h, int *i),(a,b,c,d,e,f,g,h,i),return)
|
||||
SDL_X11_SYM(void, XFixesDestroyPointerBarrier, (Display* a, PointerBarrier b), (a,b),)
|
||||
SDL_X11_SYM(int, XIBarrierReleasePointer,(Display* a, int b, PointerBarrier c, BarrierEventID d), (a,b,c,d), return)
|
||||
SDL_X11_SYM(int, XIBarrierReleasePointer,(Display* a, int b, PointerBarrier c, BarrierEventID d), (a,b,c,d), return) /* this is actually Xinput2 */
|
||||
SDL_X11_SYM(Status, XFixesQueryVersion,(Display* a, int* b, int* c), (a,b,c), return)
|
||||
#endif
|
||||
|
||||
|
|
2
externals/SDL/src/video/yuv2rgb/yuv_rgb.c
vendored
2
externals/SDL/src/video/yuv2rgb/yuv_rgb.c
vendored
|
@ -91,7 +91,7 @@ static uint8_t clampU8(int32_t v)
|
|||
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
|
||||
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
|
||||
};
|
||||
return lut[(v+128*PRECISION_FACTOR)>>PRECISION];
|
||||
return lut[((v+128*PRECISION_FACTOR)>>PRECISION)&511];
|
||||
}
|
||||
|
||||
|
||||
|
|
8
externals/SDL/test/Makefile.in
vendored
8
externals/SDL/test/Makefile.in
vendored
|
@ -235,14 +235,22 @@ testnative$(EXE): $(srcdir)/testnative.c \
|
|||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@
|
||||
endif
|
||||
|
||||
ifeq (@ISOS2@,true)
|
||||
testnative$(EXE): $(srcdir)/testnative.c \
|
||||
$(srcdir)/testnativeos2.c
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
|
||||
endif
|
||||
|
||||
#there's probably a better way of doing this
|
||||
ifeq (@ISMACOSX@,false)
|
||||
ifeq (@ISWINDOWS@,false)
|
||||
ifeq (@ISUNIX@,false)
|
||||
ifeq (@ISOS2@,false)
|
||||
testnative$(EXE): ;
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
testoverlay2$(EXE): $(srcdir)/testoverlay2.c $(srcdir)/testyuv_cvt.c
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
|
||||
|
|
15
externals/SDL/test/configure
vendored
15
externals/SDL/test/configure
vendored
|
@ -602,6 +602,7 @@ SDL_CFLAGS
|
|||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
ISOS2
|
||||
ISUNIX
|
||||
ISWINDOWS
|
||||
ISMACOSX
|
||||
|
@ -2905,6 +2906,7 @@ fi
|
|||
ISUNIX="false"
|
||||
ISWINDOWS="false"
|
||||
ISMACOSX="false"
|
||||
ISOS2="false"
|
||||
|
||||
case "$host" in
|
||||
*-*-cygwin* | *-*-mingw*)
|
||||
|
@ -2918,7 +2920,7 @@ case "$host" in
|
|||
MATHLIB=""
|
||||
SYS_GL_LIBS="-lGL"
|
||||
;;
|
||||
*-*-darwin* )
|
||||
*-*-darwin*)
|
||||
ISMACOSX="true"
|
||||
EXE=""
|
||||
MATHLIB=""
|
||||
|
@ -2990,16 +2992,22 @@ fi
|
|||
MATHLIB=""
|
||||
SYS_GL_LIBS="-lGLES_CM"
|
||||
;;
|
||||
*-*-emscripten* )
|
||||
*-*-emscripten*)
|
||||
EXE=".bc"
|
||||
MATHLIB=""
|
||||
SYS_GL_LIBS=""
|
||||
;;
|
||||
*-*-riscos* )
|
||||
*-*-riscos*)
|
||||
EXE=",e1f"
|
||||
MATHLIB=""
|
||||
SYS_GL_LIBS=""
|
||||
;;
|
||||
*-*-os2*)
|
||||
ISOS2="true"
|
||||
EXE=".exe"
|
||||
MATHLIB=""
|
||||
SYS_GL_LIBS=""
|
||||
;;
|
||||
*)
|
||||
ISUNIX="true"
|
||||
EXE=""
|
||||
|
@ -3054,6 +3062,7 @@ esac
|
|||
|
||||
|
||||
|
||||
|
||||
SDL_VERSION=2.0.18
|
||||
|
||||
|
||||
|
|
14
externals/SDL/test/configure.ac
vendored
14
externals/SDL/test/configure.ac
vendored
|
@ -18,6 +18,7 @@ dnl (Haiku, for example, sets none of these.)
|
|||
ISUNIX="false"
|
||||
ISWINDOWS="false"
|
||||
ISMACOSX="false"
|
||||
ISOS2="false"
|
||||
|
||||
dnl Figure out which math library to use
|
||||
case "$host" in
|
||||
|
@ -32,7 +33,7 @@ case "$host" in
|
|||
MATHLIB=""
|
||||
SYS_GL_LIBS="-lGL"
|
||||
;;
|
||||
*-*-darwin* )
|
||||
*-*-darwin*)
|
||||
ISMACOSX="true"
|
||||
EXE=""
|
||||
MATHLIB=""
|
||||
|
@ -64,17 +65,23 @@ case "$host" in
|
|||
MATHLIB=""
|
||||
SYS_GL_LIBS="-lGLES_CM"
|
||||
;;
|
||||
*-*-emscripten* )
|
||||
*-*-emscripten*)
|
||||
dnl This should really be .js, but we need to specify extra flags when compiling to js
|
||||
EXE=".bc"
|
||||
MATHLIB=""
|
||||
SYS_GL_LIBS=""
|
||||
;;
|
||||
*-*-riscos* )
|
||||
*-*-riscos*)
|
||||
EXE=",e1f"
|
||||
MATHLIB=""
|
||||
SYS_GL_LIBS=""
|
||||
;;
|
||||
*-*-os2*)
|
||||
ISOS2="true"
|
||||
EXE=".exe"
|
||||
MATHLIB=""
|
||||
SYS_GL_LIBS=""
|
||||
;;
|
||||
*)
|
||||
dnl Oh well, call it Unix...
|
||||
ISUNIX="true"
|
||||
|
@ -90,6 +97,7 @@ AC_SUBST(MATHLIB)
|
|||
AC_SUBST(ISMACOSX)
|
||||
AC_SUBST(ISWINDOWS)
|
||||
AC_SUBST(ISUNIX)
|
||||
AC_SUBST(ISOS2)
|
||||
|
||||
dnl Check for SDL
|
||||
SDL_VERSION=2.0.18
|
||||
|
|
Loading…
Reference in a new issue