Skip to content

Commit

Permalink
Fixed bug 5235 - All internal sources should include SDL_assert.h
Browse files Browse the repository at this point in the history
Ryan C. Gordon

We should really stick this in SDL_internal.h or something so it's always available.
  • Loading branch information
slouken committed Dec 9, 2020
1 parent 479db43 commit cb36189
Show file tree
Hide file tree
Showing 113 changed files with 6 additions and 124 deletions.
3 changes: 1 addition & 2 deletions src/SDL_dataqueue.c
Expand Up @@ -18,11 +18,10 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#include "./SDL_internal.h"

#include "SDL.h"
#include "./SDL_dataqueue.h"
#include "SDL_assert.h"

typedef struct SDL_DataQueuePacket
{
Expand Down
1 change: 1 addition & 0 deletions src/SDL_internal.h
Expand Up @@ -116,6 +116,7 @@
#define SDL_HAVE_YUV !SDL_LEAN_AND_MEAN
#endif

#include "SDL_assert.h"
#include "SDL_log.h"

#endif /* SDL_internal_h_ */
Expand Down
1 change: 0 additions & 1 deletion src/audio/SDL_audiocvt.c
Expand Up @@ -30,7 +30,6 @@
#include "SDL_audio_c.h"

#include "SDL_loadso.h"
#include "SDL_assert.h"
#include "../SDL_dataqueue.h"
#include "SDL_cpuinfo.h"

Expand Down
3 changes: 1 addition & 2 deletions src/audio/SDL_audiotypecvt.c
Expand Up @@ -18,12 +18,11 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#include "../SDL_internal.h"

#include "SDL_audio.h"
#include "SDL_audio_c.h"
#include "SDL_cpuinfo.h"
#include "SDL_assert.h"

#ifdef __ARM_NEON
#define HAVE_NEON_INTRINSICS 1
Expand Down
1 change: 0 additions & 1 deletion src/audio/alsa/SDL_alsa_audio.c
Expand Up @@ -32,7 +32,6 @@
#include <signal.h> /* For kill() */
#include <string.h>

#include "SDL_assert.h"
#include "SDL_timer.h"
#include "SDL_audio.h"
#include "../SDL_audio_c.h"
Expand Down
1 change: 0 additions & 1 deletion src/audio/android/SDL_androidaudio.c
Expand Up @@ -24,7 +24,6 @@

/* Output audio to Android */

#include "SDL_assert.h"
#include "SDL_audio.h"
#include "../SDL_audio_c.h"
#include "SDL_androidaudio.h"
Expand Down
1 change: 0 additions & 1 deletion src/audio/coreaudio/SDL_coreaudio.m
Expand Up @@ -29,7 +29,6 @@
#include "../SDL_audio_c.h"
#include "../SDL_sysaudio.h"
#include "SDL_coreaudio.h"
#include "SDL_assert.h"
#include "../../thread/SDL_systhread.h"

#define DEBUG_COREAUDIO 0
Expand Down
1 change: 0 additions & 1 deletion src/audio/directsound/SDL_directsound.c
Expand Up @@ -24,7 +24,6 @@

/* Allow access to a raw mixing buffer */

#include "SDL_assert.h"
#include "SDL_timer.h"
#include "SDL_loadso.h"
#include "SDL_audio.h"
Expand Down
1 change: 0 additions & 1 deletion src/audio/emscripten/SDL_emscriptenaudio.c
Expand Up @@ -25,7 +25,6 @@
#include "SDL_audio.h"
#include "../SDL_audio_c.h"
#include "SDL_emscriptenaudio.h"
#include "SDL_assert.h"

#include <emscripten/emscripten.h>

Expand Down
1 change: 0 additions & 1 deletion src/audio/haiku/SDL_haikuaudio.cc
Expand Up @@ -36,7 +36,6 @@ extern "C"
#include "../SDL_audio_c.h"
#include "../SDL_sysaudio.h"
#include "SDL_haikuaudio.h"
#include "SDL_assert.h"

}

Expand Down
2 changes: 0 additions & 2 deletions src/audio/jack/SDL_jackaudio.c
Expand Up @@ -18,12 +18,10 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#include "../../SDL_internal.h"

#if SDL_AUDIO_DRIVER_JACK

#include "SDL_assert.h"
#include "SDL_timer.h"
#include "SDL_audio.h"
#include "../SDL_audio_c.h"
Expand Down
1 change: 0 additions & 1 deletion src/audio/openslES/SDL_openslES.c
Expand Up @@ -26,7 +26,6 @@
https://googlesamples.github.io/android-audio-high-performance/guides/opensl_es.html
*/

#include "SDL_assert.h"
#include "SDL_audio.h"
#include "../SDL_audio_c.h"
#include "../../core/android/SDL_android.h"
Expand Down
1 change: 0 additions & 1 deletion src/audio/pulseaudio/SDL_pulseaudio.c
Expand Up @@ -26,7 +26,6 @@
Stéphan Kochen: stephan .a.t. kochen.nl
*/
#include "../../SDL_internal.h"
#include "SDL_assert.h"
#include "SDL_hints.h"

#if SDL_AUDIO_DRIVER_PULSEAUDIO
Expand Down
2 changes: 0 additions & 2 deletions src/audio/wasapi/SDL_wasapi.c
Expand Up @@ -18,7 +18,6 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#include "../../SDL_internal.h"

#if SDL_AUDIO_DRIVER_WASAPI
Expand All @@ -28,7 +27,6 @@
#include "SDL_timer.h"
#include "../SDL_audio_c.h"
#include "../SDL_sysaudio.h"
#include "SDL_assert.h"

#define COBJMACROS
#include <mmdeviceapi.h>
Expand Down
2 changes: 0 additions & 2 deletions src/audio/wasapi/SDL_wasapi_win32.c
Expand Up @@ -18,7 +18,6 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#include "../../SDL_internal.h"

/* This is code that Windows uses to talk to WASAPI-related system APIs.
Expand All @@ -34,7 +33,6 @@
#include "SDL_timer.h"
#include "../SDL_audio_c.h"
#include "../SDL_sysaudio.h"
#include "SDL_assert.h"

#define COBJMACROS
#include <mmdeviceapi.h>
Expand Down
2 changes: 0 additions & 2 deletions src/audio/wasapi/SDL_wasapi_winrt.cpp
Expand Up @@ -18,7 +18,6 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#include "../../SDL_internal.h"

// This is C++/CX code that the WinRT port uses to talk to WASAPI-related
Expand All @@ -40,7 +39,6 @@ extern "C" {
#include "SDL_timer.h"
#include "../SDL_audio_c.h"
#include "../SDL_sysaudio.h"
#include "SDL_assert.h"
}

#define COBJMACROS
Expand Down
1 change: 0 additions & 1 deletion src/audio/winmm/SDL_winmm.c
Expand Up @@ -27,7 +27,6 @@
#include "../../core/windows/SDL_windows.h"
#include <mmsystem.h>

#include "SDL_assert.h"
#include "SDL_timer.h"
#include "SDL_audio.h"
#include "../SDL_audio_c.h"
Expand Down
1 change: 0 additions & 1 deletion src/core/android/SDL_android.c
Expand Up @@ -21,7 +21,6 @@
#include "../../SDL_internal.h"

#include "SDL_stdinc.h"
#include "SDL_assert.h"
#include "SDL_atomic.h"
#include "SDL_hints.h"
#include "SDL_main.h"
Expand Down
1 change: 0 additions & 1 deletion src/core/linux/SDL_evdev.c
Expand Up @@ -39,7 +39,6 @@
#include <linux/input.h>

#include "SDL.h"
#include "SDL_assert.h"
#include "SDL_endian.h"
#include "SDL_scancode.h"
#include "../../events/SDL_events_c.h"
Expand Down
1 change: 0 additions & 1 deletion src/core/unix/SDL_poll.c
Expand Up @@ -21,7 +21,6 @@

#include "../../SDL_internal.h"

#include "SDL_assert.h"
#include "SDL_poll.h"

#ifdef HAVE_POLL
Expand Down
1 change: 0 additions & 1 deletion src/core/windows/SDL_hid.c
Expand Up @@ -22,7 +22,6 @@

#ifndef __WINRT__

#include "SDL_assert.h"
#include "SDL_hid.h"


Expand Down
1 change: 0 additions & 1 deletion src/core/windows/SDL_windows.c
Expand Up @@ -24,7 +24,6 @@

#include "SDL_windows.h"
#include "SDL_error.h"
#include "SDL_assert.h"

#include <objbase.h> /* for CoInitialize/CoUninitialize (Win32 only) */

Expand Down
1 change: 0 additions & 1 deletion src/core/windows/SDL_xinput.c
Expand Up @@ -20,7 +20,6 @@
*/
#include "../../SDL_internal.h"

#include "SDL_assert.h"
#include "SDL_xinput.h"


Expand Down
1 change: 0 additions & 1 deletion src/core/winrt/SDL_winrtapp_direct3d.cpp
Expand Up @@ -47,7 +47,6 @@ using namespace Windows::Phone::UI::Input;

/* SDL includes */
extern "C" {
#include "SDL_assert.h"
#include "SDL_events.h"
#include "SDL_hints.h"
#include "SDL_main.h"
Expand Down
1 change: 0 additions & 1 deletion src/events/SDL_keyboard.c
Expand Up @@ -25,7 +25,6 @@
#include "SDL_timer.h"
#include "SDL_events.h"
#include "SDL_events_c.h"
#include "SDL_assert.h"
#include "../video/SDL_sysvideo.h"


Expand Down
1 change: 0 additions & 1 deletion src/events/SDL_mouse.c
Expand Up @@ -22,7 +22,6 @@

/* General mouse handling code for SDL */

#include "SDL_assert.h"
#include "SDL_hints.h"
#include "SDL_timer.h"
#include "SDL_events.h"
Expand Down
2 changes: 1 addition & 1 deletion src/events/SDL_quit.c
Expand Up @@ -19,8 +19,8 @@
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_internal.h"

#include "SDL_hints.h"
#include "SDL_assert.h"

/* General quit handling code for SDL */

Expand Down
1 change: 0 additions & 1 deletion src/events/SDL_touch.c
Expand Up @@ -22,7 +22,6 @@

/* General touch handling code for SDL */

#include "SDL_assert.h"
#include "SDL_events.h"
#include "SDL_events_c.h"
#include "../video/SDL_sysvideo.h"
Expand Down
1 change: 0 additions & 1 deletion src/filesystem/haiku/SDL_sysfilesystem.cc
Expand Up @@ -32,7 +32,6 @@

#include "SDL_error.h"
#include "SDL_stdinc.h"
#include "SDL_assert.h"
#include "SDL_filesystem.h"

char *
Expand Down
1 change: 0 additions & 1 deletion src/filesystem/windows/SDL_sysfilesystem.c
Expand Up @@ -28,7 +28,6 @@
#include "../../core/windows/SDL_windows.h"
#include <shlobj.h>

#include "SDL_assert.h"
#include "SDL_error.h"
#include "SDL_stdinc.h"
#include "SDL_filesystem.h"
Expand Down
1 change: 0 additions & 1 deletion src/haptic/SDL_haptic.c
Expand Up @@ -23,7 +23,6 @@
#include "SDL_syshaptic.h"
#include "SDL_haptic_c.h"
#include "../joystick/SDL_joystick_c.h" /* For SDL_PrivateJoystickValid */
#include "SDL_assert.h"

/* Global for SDL_windowshaptic.c */
#if (defined(SDL_HAPTIC_DINPUT) && SDL_HAPTIC_DINPUT) || (defined(SDL_HAPTIC_XINPUT) && SDL_HAPTIC_XINPUT)
Expand Down
1 change: 0 additions & 1 deletion src/haptic/android/SDL_syshaptic.c
Expand Up @@ -22,7 +22,6 @@

#ifdef SDL_HAPTIC_ANDROID

#include "SDL_assert.h"
#include "SDL_timer.h"
#include "SDL_syshaptic_c.h"
#include "../SDL_syshaptic.h"
Expand Down
1 change: 0 additions & 1 deletion src/haptic/darwin/SDL_syshaptic.c
Expand Up @@ -22,7 +22,6 @@

#ifdef SDL_HAPTIC_IOKIT

#include "SDL_assert.h"
#include "SDL_stdinc.h"
#include "SDL_haptic.h"
#include "../SDL_syshaptic.h"
Expand Down
1 change: 0 additions & 1 deletion src/haptic/linux/SDL_syshaptic.c
Expand Up @@ -22,7 +22,6 @@

#ifdef SDL_HAPTIC_LINUX

#include "SDL_assert.h"
#include "SDL_haptic.h"
#include "../SDL_syshaptic.h"
#include "SDL_joystick.h"
Expand Down
1 change: 0 additions & 1 deletion src/haptic/windows/SDL_windowshaptic.c
Expand Up @@ -22,7 +22,6 @@

#if SDL_HAPTIC_DINPUT || SDL_HAPTIC_XINPUT

#include "SDL_assert.h"
#include "SDL_thread.h"
#include "SDL_mutex.h"
#include "SDL_timer.h"
Expand Down
1 change: 0 additions & 1 deletion src/haptic/windows/SDL_xinputhaptic.c
Expand Up @@ -26,7 +26,6 @@

#if SDL_HAPTIC_XINPUT

#include "SDL_assert.h"
#include "SDL_hints.h"
#include "SDL_timer.h"
#include "SDL_windowshaptic_c.h"
Expand Down
1 change: 0 additions & 1 deletion src/joystick/SDL_gamecontroller.c
Expand Up @@ -23,7 +23,6 @@
/* This is the game controller API for Simple DirectMedia Layer */

#include "SDL_events.h"
#include "SDL_assert.h"
#include "SDL_hints.h"
#include "SDL_timer.h"
#include "SDL_sysjoystick.h"
Expand Down
1 change: 0 additions & 1 deletion src/joystick/SDL_joystick.c
Expand Up @@ -26,7 +26,6 @@
#include "SDL_atomic.h"
#include "SDL_events.h"
#include "SDL_sysjoystick.h"
#include "SDL_assert.h"
#include "SDL_hints.h"

#if !SDL_EVENTS_DISABLED
Expand Down
2 changes: 0 additions & 2 deletions src/joystick/android/SDL_sysjoystick.c
Expand Up @@ -18,7 +18,6 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#include "../../SDL_internal.h"

#ifdef SDL_JOYSTICK_ANDROID
Expand All @@ -29,7 +28,6 @@

#include "SDL_joystick.h"
#include "SDL_hints.h"
#include "SDL_assert.h"
#include "SDL_timer.h"
#include "SDL_sysjoystick_c.h"
#include "../SDL_joystick_c.h"
Expand Down
1 change: 0 additions & 1 deletion src/joystick/emscripten/SDL_sysjoystick.c
Expand Up @@ -28,7 +28,6 @@
#include "SDL_events.h"

#include "SDL_joystick.h"
#include "SDL_assert.h"
#include "SDL_timer.h"
#include "SDL_sysjoystick_c.h"
#include "../SDL_joystick_c.h"
Expand Down
1 change: 0 additions & 1 deletion src/joystick/hidapi/SDL_hidapi_rumble.c
Expand Up @@ -24,7 +24,6 @@

/* Handle rumble on a separate thread so it doesn't block the application */

#include "SDL_assert.h"
#include "SDL_thread.h"
#include "SDL_hidapijoystick_c.h"
#include "SDL_hidapi_rumble.h"
Expand Down
1 change: 0 additions & 1 deletion src/joystick/hidapi/SDL_hidapijoystick.c
Expand Up @@ -22,7 +22,6 @@

#ifdef SDL_JOYSTICK_HIDAPI

#include "SDL_assert.h"
#include "SDL_atomic.h"
#include "SDL_endian.h"
#include "SDL_hints.h"
Expand Down
1 change: 0 additions & 1 deletion src/joystick/iphoneos/SDL_mfijoystick.m
Expand Up @@ -21,7 +21,6 @@
#include "../../SDL_internal.h"

/* This is the iOS implementation of the SDL joystick API */
#include "SDL_assert.h"
#include "SDL_events.h"
#include "SDL_joystick.h"
#include "SDL_hints.h"
Expand Down

0 comments on commit cb36189

Please sign in to comment.