Switch header convention from #include "SDL.h" to #include <SDL3/SDLh>
I ran this script in the include directory:
```sh
sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h
```
I ran this script in the src directory:
```sh
for i in ../include/SDL3/SDL*.h
do hdr=$(basename $i)
if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then
find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \;
else
find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \;
fi
done
```
Fixes https://github.com/libsdl-org/SDL/issues/6575
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
/*
|
||||
SDL_dummy_main.c, placed in the public domain by Sam Lantinga 3/13/14
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
/* Include the SDL main definition header */
|
||||
#include "SDL_main.h"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#ifdef main
|
||||
#undef main
|
||||
|
||||
@@ -18,14 +18,11 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
/* Include this so we define UNICODE properly */
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
|
||||
/* Include the SDL main definition header */
|
||||
#include "SDL.h"
|
||||
#include "SDL_main.h"
|
||||
|
||||
#ifdef main
|
||||
# undef main
|
||||
#endif /* main */
|
||||
|
||||
@@ -37,7 +37,6 @@ extern "C" {
|
||||
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#include "SDL_video.h"
|
||||
|
||||
/* Local includes */
|
||||
#include "../../events/SDL_events_c.h"
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
|
||||
#include "SDL_BApp.h" /* SDL_BApp class definition */
|
||||
#include "SDL_BeApp.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "../../video/haiku/SDL_BWin.h"
|
||||
|
||||
|
||||
@@ -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"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#ifdef __3DS__
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include <3ds.h>
|
||||
|
||||
#ifdef main
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
/*
|
||||
SDL_ngage_main.c, originally for SDL 1.2 by Hannu Viitala
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
/* Include the SDL main definition header */
|
||||
#include "SDL_main.h"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <e32std.h>
|
||||
#include <e32def.h>
|
||||
@@ -16,7 +13,10 @@
|
||||
#include <w32std.h>
|
||||
#include <apgtask.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
|
||||
#ifdef main
|
||||
#undef main
|
||||
#endif
|
||||
|
||||
extern "C" int main(int argc, char *argv[]);
|
||||
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
/*
|
||||
SDL_ps2_main.c, fjtrujy@gmail.com
|
||||
*/
|
||||
|
||||
#include "SDL_platform.h"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#ifdef __PS2__
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
/*
|
||||
SDL_psp_main.c, placed in the public domain by Sam Lantinga 3/13/14
|
||||
*/
|
||||
#include "SDL_platform.h"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#ifdef __PSP__
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include <pspkernel.h>
|
||||
#include <pspthreadman.h>
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/*
|
||||
SDL_uikit_main.c, placed in the public domain by Sam Lantinga 3/18/2019
|
||||
*/
|
||||
|
||||
/* Include the SDL main definition header */
|
||||
#include "SDL_main.h"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#if defined(__IOS__) || defined(__TVOS__)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
The WinMain function -- calls your program's main() function
|
||||
*/
|
||||
#include "SDL_platform.h"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#ifdef __WIN32__
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
#include <shellapi.h> /* CommandLineToArgvW() */
|
||||
|
||||
/* Include the SDL main definition header */
|
||||
#include "SDL.h"
|
||||
#include "SDL_main.h"
|
||||
|
||||
#ifdef main
|
||||
# undef main
|
||||
#endif /* main */
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
SDL_winrt_main_NonXAML.cpp, placed in the public domain by David Ludwig 3/13/14
|
||||
*/
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include <wrl.h>
|
||||
|
||||
/* At least one file in any SDL/WinRT app appears to require compilation
|
||||
|
||||
Reference in New Issue
Block a user