First pass at changing SDL 2.0 to SDL 3.0

This commit is contained in:
Sam Lantinga
2022-11-21 20:28:58 -08:00
parent 0bfeed061b
commit 2c4159b99a
146 changed files with 2633 additions and 2635 deletions

View File

@@ -146,7 +146,7 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
/**
* Compatibility function to initialize the SDL library.
*
* In SDL2, this function and SDL_Init() are interchangeable.
* This function and SDL_Init() are interchangeable.
*
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
* \returns 0 on success or a negative error code on failure; call

View File

@@ -1211,7 +1211,7 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
* You should not call SDL_LockAudio() on the device before queueing; SDL
* handles locking internally for this function.
*
* Note that SDL2 does not support planar audio. You will need to resample
* Note that SDL does not support planar audio. You will need to resample
* from planar audio formats into a non-planar one (see SDL_AudioFormat)
* before queuing audio.
*

View File

@@ -352,7 +352,7 @@ extern "C" {
* \brief Disable giving back control to the browser automatically
* when running with asyncify
*
* With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations
* With -s ASYNCIFY, SDL calls emscripten_sleep during operations
* such as refreshing the screen or polling events.
*
* This hint only applies to the emscripten platform

View File

@@ -55,7 +55,7 @@
/* On GDK, SDL provides a main function that initializes the game runtime.
Please note that #include'ing SDL_main.h is not enough to get a main()
function working. You must either link against SDL2main or, if not possible,
function working. You must either link against SDL3main or, if not possible,
call the SDL_GDKRunApp function from your entry point.
*/
#define SDL_MAIN_NEEDED

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
#ifndef SDL_test_h_

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/* Ported from original test\common.h file. */

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
#ifndef SDL_test_font_h_

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
#ifndef SDL_test_memory_h_

View File

@@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@@ -94,15 +94,15 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
*
* We compile SDL into a DLL. This means, that it's the DLL which
* creates a new thread for the calling process with the SDL_CreateThread()
* API. There is a problem with this, that only the RTL of the SDL2.DLL will
* API. There is a problem with this, that only the RTL of the SDL3.DLL will
* be initialized for those threads, and not the RTL of the calling
* application!
*
* To solve this, we make a little hack here.
*
* We'll always use the caller's _beginthread() and _endthread() APIs to
* start a new thread. This way, if it's the SDL2.DLL which uses this API,
* then the RTL of SDL2.DLL will be used to create the new thread, and if it's
* start a new thread. This way, if it's the SDL3.DLL which uses this API,
* then the RTL of SDL3.DLL will be used to create the new thread, and if it's
* the application, then the RTL of the application will be used.
*
* So, in short:
@@ -147,7 +147,7 @@ SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn,
#elif defined(__OS2__)
/*
* just like the windows case above: We compile SDL2
* just like the windows case above: We compile SDL3
* into a dll with Watcom's runtime statically linked.
*/
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD

View File

@@ -57,8 +57,8 @@ typedef struct SDL_version
/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 26
#define SDL_MAJOR_VERSION 3
#define SDL_MINOR_VERSION 0
#define SDL_PATCHLEVEL 0
/**
@@ -84,7 +84,7 @@ typedef struct SDL_version
}
/* TODO: Remove this whole block in SDL 3 */
#if SDL_MAJOR_VERSION < 3
#if SDL_MAJOR_VERSION <= 3
/**
* This macro turns the version numbers into a numeric value:
* \verbatim