Skip to content

Commit c134642

Browse files
committed
SDL hg-9859:2ec928ff921c
1 parent 61c8ff7 commit c134642

File tree

649 files changed

+10837
-5253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

649 files changed

+10837
-5253
lines changed

files.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,23 @@
390390
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/video/android/SDL_androidvideo.c" />
391391
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/video/android/SDL_androidwindow.c" />
392392
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/video/android/SDL_androidmessagebox.c" />
393+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/video/android/SDL_androidmouse.c" />
393394
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/haptic/dummy/SDL_syshaptic.c" />
394395

395396
</section>
396397

398+
<section if="emscripten">
399+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/video/emscripten/SDL_emscriptenevents.c" />
400+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/video/emscripten/SDL_emscriptenframebuffer.c" />
401+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/video/emscripten/SDL_emscriptenmouse.c" />
402+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/video/emscripten/SDL_emscriptenopengles.c" />
403+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/video/emscripten/SDL_emscriptenvideo.c" />
404+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/power/emscripten/SDL_syspower.c" />
405+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/joystick/emscripten/SDL_sysjoystick.c" />
406+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/filesystem/emscripten/SDL_sysfilesystem.c" />
407+
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/audio/emscripten/SDL_emscriptenaudio.c" />
408+
</section>
409+
397410
</files>
398411

399412
</xml>

include/SDL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2014 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2015 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

include/SDL_assert.h

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2014 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2015 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -86,8 +86,10 @@ This also solves the problem of...
8686
disable assertions.
8787
*/
8888

89+
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
90+
this condition isn't constant. And looks like an owl's face! */
8991
#ifdef _MSC_VER /* stupid /W4 warnings. */
90-
#define SDL_NULL_WHILE_LOOP_CONDITION (-1 == __LINE__)
92+
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
9193
#else
9294
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
9395
#endif
@@ -102,23 +104,23 @@ typedef enum
102104
SDL_ASSERTION_ABORT, /**< Terminate the program. */
103105
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
104106
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
105-
} SDL_assert_state;
107+
} SDL_AssertState;
106108

107-
typedef struct SDL_assert_data
109+
typedef struct SDL_AssertData
108110
{
109111
int always_ignore;
110112
unsigned int trigger_count;
111113
const char *condition;
112114
const char *filename;
113115
int linenum;
114116
const char *function;
115-
const struct SDL_assert_data *next;
116-
} SDL_assert_data;
117+
const struct SDL_AssertData *next;
118+
} SDL_AssertData;
117119

118120
#if (SDL_ASSERT_LEVEL > 0)
119121

120122
/* Never call this directly. Use the SDL_assert* macros. */
121-
extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
123+
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
122124
const char *,
123125
const char *, int)
124126
#if defined(__clang__)
@@ -141,10 +143,10 @@ extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
141143
#define SDL_enabled_assert(condition) \
142144
do { \
143145
while ( !(condition) ) { \
144-
static struct SDL_assert_data sdl_assert_data = { \
146+
static struct SDL_AssertData sdl_assert_data = { \
145147
0, 0, #condition, 0, 0, 0, 0 \
146148
}; \
147-
const SDL_assert_state sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
149+
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
148150
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
149151
continue; /* go again. */ \
150152
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
@@ -181,8 +183,8 @@ extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
181183
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
182184

183185

184-
typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
185-
const SDL_assert_data* data, void* userdata);
186+
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
187+
const SDL_AssertData* data, void* userdata);
186188

187189
/**
188190
* \brief Set an application-defined assertion handler.
@@ -199,7 +201,7 @@ typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
199201
*
200202
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
201203
*
202-
* \return SDL_assert_state value of how to handle the assertion failure.
204+
* \return SDL_AssertState value of how to handle the assertion failure.
203205
*
204206
* \param handler Callback function, called when an assertion fails.
205207
* \param userdata A pointer passed to the callback as-is.
@@ -246,7 +248,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
246248
* The proper way to examine this data looks something like this:
247249
*
248250
* <code>
249-
* const SDL_assert_data *item = SDL_GetAssertionReport();
251+
* const SDL_AssertData *item = SDL_GetAssertionReport();
250252
* while (item) {
251253
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
252254
* item->condition, item->function, item->filename,
@@ -259,7 +261,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
259261
* \return List of all assertions.
260262
* \sa SDL_ResetAssertionReport
261263
*/
262-
extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void);
264+
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
263265

264266
/**
265267
* \brief Reset the list of all assertion failures.
@@ -270,6 +272,12 @@ extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void);
270272
*/
271273
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
272274

275+
276+
/* these had wrong naming conventions until 2.0.4. Please update your app! */
277+
#define SDL_assert_state SDL_AssertState
278+
#define SDL_assert_data SDL_AssertData
279+
280+
273281
/* Ends C function definitions when using C++ */
274282
#ifdef __cplusplus
275283
}

include/SDL_atomic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2014 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2015 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -122,7 +122,7 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
122122
void _ReadWriteBarrier(void);
123123
#pragma intrinsic(_ReadWriteBarrier)
124124
#define SDL_CompilerBarrier() _ReadWriteBarrier()
125-
#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
125+
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
126126
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
127127
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
128128
#else

include/SDL_audio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2014 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2015 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

include/SDL_bits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2014 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2015 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

include/SDL_blendmode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2014 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2015 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -58,6 +58,6 @@ typedef enum
5858
#endif
5959
#include "close_code.h"
6060

61-
#endif /* _SDL_video_h */
61+
#endif /* _SDL_blendmode_h */
6262

6363
/* vi: set ts=4 sw=4 expandtab: */

include/SDL_clipboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2014 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2015 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

include/SDL_config_android.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2014 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2015 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -43,7 +43,6 @@
4343
#define HAVE_STDINT_H 1
4444
#define HAVE_CTYPE_H 1
4545
#define HAVE_MATH_H 1
46-
#define HAVE_SIGNAL_H 1
4746

4847
/* C library functions */
4948
#define HAVE_MALLOC 1
@@ -76,7 +75,6 @@
7675
#define HAVE_STRTOULL 1
7776
#define HAVE_STRTOD 1
7877
#define HAVE_ATOI 1
79-
#define HAVE_ATOF 1
8078
#define HAVE_STRCMP 1
8179
#define HAVE_STRNCMP 1
8280
#define HAVE_STRCASECMP 1
@@ -103,10 +101,10 @@
103101
#define HAVE_SQRTF 1
104102
#define HAVE_TAN 1
105103
#define HAVE_TANF 1
106-
#define HAVE_SIGACTION 1
107104
#define HAVE_SETJMP 1
108105
#define HAVE_NANOSLEEP 1
109106
#define HAVE_SYSCONF 1
107+
#define HAVE_CLOCK_GETTIME 1
110108

111109
#define SIZEOF_VOIDP 4
112110

include/SDL_config_iphoneos.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2014 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2015 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -145,6 +145,9 @@
145145
/* enable iPhone keyboard support */
146146
#define SDL_IPHONE_KEYBOARD 1
147147

148+
/* enable iOS extended launch screen */
149+
#define SDL_IPHONE_LAUNCHSCREEN 1
150+
148151
/* enable joystick subsystem */
149152
#define SDL_JOYSTICK_DISABLED 0
150153

0 commit comments

Comments
 (0)