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:
@@ -19,7 +19,6 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "../SDL_internal.h"
|
||||
#include "SDL_power.h"
|
||||
#include "SDL_syspower.h"
|
||||
|
||||
/*
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#ifndef SDL_syspower_h_
|
||||
#define SDL_syspower_h_
|
||||
|
||||
#include "SDL_power.h"
|
||||
|
||||
/* Not all of these are available in a given build. Use #ifdefs, etc. */
|
||||
SDL_bool SDL_GetPowerInfo_Linux_org_freedesktop_upower(SDL_PowerState *, int *, int *);
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#ifndef SDL_POWER_DISABLED
|
||||
#if SDL_POWER_ANDROID
|
||||
|
||||
#include "SDL_power.h"
|
||||
#include "../SDL_syspower.h"
|
||||
|
||||
#include "../../core/android/SDL_android.h"
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include <emscripten/html5.h>
|
||||
|
||||
#include "SDL_power.h"
|
||||
|
||||
SDL_bool
|
||||
SDL_GetPowerInfo_Emscripten(SDL_PowerState *state, int *seconds, int *percent)
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#define APM_DEVICE_ALL 1
|
||||
#define APM_BIOS_CALL (B_DEVICE_OP_CODES_END + 3)
|
||||
|
||||
#include "SDL_power.h"
|
||||
|
||||
SDL_bool
|
||||
SDL_GetPowerInfo_Haiku(SDL_PowerState * state, int *seconds, int *percent)
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "SDL_power.h"
|
||||
#include "../SDL_syspower.h"
|
||||
|
||||
#include "../../core/linux/SDL_dbus.h"
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <IOKit/ps/IOPowerSources.h>
|
||||
#include <IOKit/ps/IOPSKeys.h>
|
||||
|
||||
#include "SDL_power.h"
|
||||
|
||||
/* CoreFoundation is so verbose... */
|
||||
#define STRMATCH(a,b) (CFStringCompare(a, b, 0) == kCFCompareEqualTo)
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
|
||||
#include <3ds.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_power.h"
|
||||
|
||||
SDL_FORCE_INLINE SDL_PowerState GetPowerState(void);
|
||||
SDL_FORCE_INLINE int ReadStateFromPTMU(bool *is_plugged, u8 *is_charging);
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#ifndef SDL_POWER_DISABLED
|
||||
#if SDL_POWER_PSP
|
||||
|
||||
#include "SDL_power.h"
|
||||
#include <psppower.h>
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#if SDL_POWER_UIKIT
|
||||
|
||||
#include "SDL_power.h"
|
||||
|
||||
void SDL_UIKit_UpdateBatteryMonitoring(void);
|
||||
SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState * state, int *seconds, int *percent);
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include "SDL_power.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_syspower.h"
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#ifndef SDL_POWER_DISABLED
|
||||
#if SDL_POWER_VITA
|
||||
|
||||
#include "SDL_power.h"
|
||||
#include <psp2/power.h>
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
|
||||
#include "SDL_power.h"
|
||||
|
||||
SDL_bool
|
||||
SDL_GetPowerInfo_Windows(SDL_PowerState * state, int *seconds, int *percent)
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#ifndef SDL_POWER_DISABLED
|
||||
#if SDL_POWER_WINRT
|
||||
|
||||
#include "SDL_power.h"
|
||||
|
||||
extern "C"
|
||||
SDL_bool
|
||||
|
||||
Reference in New Issue
Block a user