winrt: Removed WinRT/Windows Phone/UWP support.

Fixes #10724.
This commit is contained in:
Ryan C. Gordon
2024-09-05 23:36:16 -04:00
parent 6d7c211faf
commit 154452a726
126 changed files with 150 additions and 9582 deletions

View File

@@ -53,7 +53,7 @@
/* Some compilers use a special export keyword */
#ifndef SDL_DECLSPEC
# if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_CYGWIN) || defined(SDL_PLATFORM_GDK)
# if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_CYGWIN) || defined(SDL_PLATFORM_GDK)
# ifdef DLL_EXPORT
# define SDL_DECLSPEC __declspec(dllexport)
# else
@@ -70,7 +70,7 @@
/* By default SDL uses the C calling convention */
#ifndef SDLCALL
#if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK)) && !defined(__GNUC__)
#if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)) && !defined(__GNUC__)
#define SDLCALL __cdecl
#else
#define SDLCALL

View File

@@ -143,19 +143,19 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetPrefPath(const char *org, const char *
*
* The folders supported per platform are:
*
* | | Windows | WinRT/UWP |macOS/iOS | tvOS | Unix (XDG) | Haiku | Emscripten |
* | ----------- | ------- | --------- |--------- | ---- | ---------- | ----- | ---------- |
* | HOME | X | X | X | | X | X | X |
* | DESKTOP | X | X | X | | X | X | |
* | DOCUMENTS | X | X | X | | X | | |
* | DOWNLOADS | Vista+ | X | X | | X | | |
* | MUSIC | X | X | X | | X | | |
* | PICTURES | X | X | X | | X | | |
* | PUBLICSHARE | | | X | | X | | |
* | SAVEDGAMES | Vista+ | | | | | | |
* | SCREENSHOTS | Vista+ | X | | | | | |
* | TEMPLATES | X | X | X | | X | | |
* | VIDEOS | X | X | X* | | X | | |
* | | Windows | macOS/iOS | tvOS | Unix (XDG) | Haiku | Emscripten |
* | ----------- | ------- | --------- | ---- | ---------- | ----- | ---------- |
* | HOME | X | X | | X | X | X |
* | DESKTOP | X | X | | X | X | |
* | DOCUMENTS | X | X | | X | | |
* | DOWNLOADS | Vista+ | X | | X | | |
* | MUSIC | X | X | | X | | |
* | PICTURES | X | X | | X | | |
* | PUBLICSHARE | | X | | X | | |
* | SAVEDGAMES | Vista+ | | | | | |
* | SCREENSHOTS | Vista+ | | | | | |
* | TEMPLATES | X | X | | X | | |
* | VIDEOS | X | X* | | X | | |
*
* Note that on macOS/iOS, the Videos folder is called "Movies".
*

View File

@@ -3938,119 +3938,6 @@ extern "C" {
*/
#define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE "SDL_WINDOWS_ERASE_BACKGROUND_MODE"
/**
* A variable controlling whether back-button-press events on Windows Phone to
* be marked as handled.
*
* Windows Phone devices typically feature a Back button. When pressed, the OS
* will emit back-button-press events, which apps are expected to handle in an
* appropriate manner. If apps do not explicitly mark these events as
* 'Handled', then the OS will invoke its default behavior for unhandled
* back-button-press events, which on Windows Phone 8 and 8.1 is to terminate
* the app (and attempt to switch to the previous app, or to the device's home
* screen).
*
* Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL to
* mark back-button-press events as Handled, if and when one is sent to the
* app.
*
* Internally, Windows Phone sends back button events as parameters to special
* back-button-press callback functions. Apps that need to respond to
* back-button-press events are expected to register one or more callback
* functions for such, shortly after being launched (during the app's
* initialization phase). After the back button is pressed, the OS will invoke
* these callbacks. If the app's callback(s) do not explicitly mark the event
* as handled by the time they return, or if the app never registers one of
* these callback, the OS will consider the event un-handled, and it will
* apply its default back button behavior (terminate the app).
*
* SDL registers its own back-button-press callback with the Windows Phone OS.
* This callback will emit a pair of SDL key-press events (SDL_EVENT_KEY_DOWN
* and SDL_EVENT_KEY_UP), each with a scancode of SDL_SCANCODE_AC_BACK, after
* which it will check the contents of the hint,
* SDL_HINT_WINRT_HANDLE_BACK_BUTTON. If the hint's value is set to "1", the
* back button event's Handled property will get set to 'true'. If the hint's
* value is set to something else, or if it is unset, SDL will leave the
* event's Handled property alone. (By default, the OS sets this property to
* 'false', to note.)
*
* SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
* back button is pressed, or can set it in direct-response to a back button
* being pressed.
*
* In order to get notified when a back button is pressed, SDL apps should
* register a callback function with SDL_AddEventWatch(), and have it listen
* for SDL_EVENT_KEY_DOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
* (Alternatively, SDL_EVENT_KEY_UP events can be listened-for. Listening for
* either event type is suitable.) Any value of
* SDL_HINT_WINRT_HANDLE_BACK_BUTTON set by such a callback, will be applied
* to the OS' current back-button-press event.
*
* More details on back button behavior in Windows Phone apps can be found at
* the following page, on Microsoft's developer site:
* http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
/**
* A variable specifying the label text for a WinRT app's privacy policy link.
*
* Network-enabled WinRT apps must include a privacy policy. On Windows 8,
* 8.1, and RT, Microsoft mandates that this policy be available via the
* Windows Settings charm. SDL provides code to add a link there, with its
* label text being set via the optional hint,
* SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
*
* Please note that a privacy policy's contents are not set via this hint. A
* separate hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the
* actual text of the policy.
*
* The contents of this hint should be encoded as a UTF8 string.
*
* The default value is "Privacy Policy".
*
* For additional information on linking to a privacy policy, see the
* documentation for SDL_HINT_WINRT_PRIVACY_POLICY_URL.
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
/**
* A variable specifying the URL to a WinRT app's privacy policy.
*
* All network-enabled WinRT apps must make a privacy policy available to its
* users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
* available in the Windows Settings charm, as accessed from within the app.
* SDL provides code to add a URL-based link there, which can point to the
* app's privacy policy.
*
* To setup a URL to an app's privacy policy, set
* SDL_HINT_WINRT_PRIVACY_POLICY_URL before calling any SDL_Init() functions.
* The contents of the hint should be a valid URL. For example,
* "http://www.example.com".
*
* The default value is "", which will prevent SDL from adding a privacy
* policy link to the Settings charm. This hint should only be set during app
* init.
*
* The label text of an app's "Privacy Policy" link may be customized via
* another hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
*
* Please note that on Windows Phone, Microsoft does not provide standard UI
* for displaying a privacy policy link, and as such,
* SDL_HINT_WINRT_PRIVACY_POLICY_URL will not get used on that platform.
* Network-enabled phone apps should display their privacy policy through some
* other, in-app means.
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
/**
* A variable controlling whether X11 windows are marked as override-redirect.
*

View File

@@ -48,20 +48,6 @@
*/
#define SDL_MAIN_AVAILABLE
#elif defined(SDL_PLATFORM_WINRT)
/* On WinRT, SDL provides a main function that initializes CoreApplication,
creating an instance of IFrameworkView in the process.
Ideally, #include'ing SDL_main.h is enough to get a main() function working.
However, that requires the source file your main() is in to be compiled
as C++ *and* with the /ZW compiler flag. If that's not feasible, add an
otherwise empty .cpp file that only contains `#include <SDL3/SDL_main.h>`
and build that with /ZW (still include SDL_main.h in your other file with main()!).
In XAML apps, instead the function SDL_RunApp() must be called with a pointer
to the Direct3D-hosted XAML control passed in as the "reserved" argument.
*/
#define SDL_MAIN_NEEDED
#elif defined(SDL_PLATFORM_GDK)
/* On GDK, SDL provides a main function that initializes the game runtime.
@@ -591,7 +577,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
/* platforms which main (-equivalent) can be implemented in plain C */
#include <SDL3/SDL_main_impl.h>
#elif defined(SDL_PLATFORM_WINRT) /* C++ platforms */
#elif 0 /* C++ platforms (currently none, this used to be here for WinRT, but is left for future platforms that might arrive. */
#ifdef __cplusplus
#include <SDL3/SDL_main_impl.h>
#else
@@ -605,7 +591,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
#endif /* __GNUC__ */
#endif /* __cplusplus */
#endif /* C++ platforms like SDL_PLATFORM_WINRT etc */
#endif /* C++ platforms */
#endif
#endif /* SDL_main_h_ */

View File

@@ -126,70 +126,6 @@
/* end of SDL_PLATFORM_WIN32 and SDL_PLATFORM_GDK impls */
#elif defined(SDL_PLATFORM_WINRT)
/* WinRT main based on SDL_winrt_main_NonXAML.cpp, placed in the public domain by David Ludwig 3/13/14 */
#include <wrl.h>
/* At least one file in any SDL/WinRT app appears to require compilation
with C++/CX, otherwise a Windows Metadata file won't get created, and
an APPX0702 build error can appear shortly after linking.
The following set of preprocessor code forces this file to be compiled
as C++/CX, which appears to cause Visual C++ 2012's build tools to
create this .winmd file, and will help allow builds of SDL/WinRT apps
to proceed without error.
If other files in an app's project enable C++/CX compilation, then it might
be possible for the .cpp file including SDL_main.h to be compiled without /ZW,
for Visual C++'s build tools to create a winmd file, and for the app to
build without APPX0702 errors. In this case, if
SDL_WINRT_METADATA_FILE_AVAILABLE is defined as a C/C++ macro, then
the #error (to force C++/CX compilation) will be disabled.
Please note that /ZW can be specified on a file-by-file basis. To do this,
right click on the file in Visual C++, click Properties, then change the
setting through the dialog that comes up.
*/
#ifndef SDL_WINRT_METADATA_FILE_AVAILABLE
#if !defined(__cplusplus) || (!defined(__cplusplus_winrt) && _MSVC_LANG < 202002L)
#error The C++ file that includes SDL_main.h must be compiled as C++ code with /ZW, otherwise build errors due to missing .winmd files can occur.
#endif
#endif
/* Prevent MSVC++ from warning about threading models when defining our
custom WinMain. The threading model will instead be set via a direct
call to Windows::Foundation::Initialize (rather than via an attributed
function).
To note, this warning (C4447) does not seem to come up unless this file
is compiled with C++/CX enabled (via the /ZW compiler flag).
*/
#ifdef _MSC_VER
#pragma warning(disable : 4447)
/* Make sure the function to initialize the Windows Runtime gets linked in. */
#pragma comment(lib, "runtimeobject.lib")
#endif
#ifdef __cplusplus
extern "C" {
#endif
int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
return SDL_RunApp(0, NULL, SDL_main, NULL);
}
#if _MSVC_LANG >= 202002L
int main(int argc, char** argv) {
return SDL_RunApp(argc, argv, SDL_main, NULL);
}
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
/* end of WinRT impl */
#elif defined(SDL_PLATFORM_NGAGE)
/* same typedef as in ngage SDKs e32def.h */
typedef signed int TInt;

View File

@@ -625,8 +625,6 @@
#define SDL_LinuxSetThreadPriorityAndPolicy SDL_SetLinuxThreadPriorityAndPolicy
#define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidEnterForeground
#define SDL_OnApplicationWillResignActive SDL_OnApplicationWillEnterBackground
#define SDL_WinRTGetDeviceFamily SDL_GetWinRTDeviceFamily
#define SDL_GetWinRTFSPathUTF8 SDL_GetWinRTFSPath
#define SDL_iOSSetAnimationCallback SDL_SetiOSAnimationCallback
#define SDL_iOSSetEventPump SDL_SetiOSEventPump
#define SDL_iPhoneSetAnimationCallback SDL_SetiOSAnimationCallback
@@ -1251,8 +1249,6 @@
#define SDL_LinuxSetThreadPriorityAndPolicy SDL_LinuxSetThreadPriorityAndPolicy_renamed_SDL_SetLinuxThreadPriorityAndPolicy
#define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidBecomeActive_renamed_SDL_OnApplicationDidEnterForeground
#define SDL_OnApplicationWillResignActive SDL_OnApplicationWillResignActive_renamed_SDL_OnApplicationWillEnterBackground
#define SDL_WinRTGetDeviceFamily SDL_WinRTGetDeviceFamily_renamed_SDL_GetWinRTDeviceFamily
#define SDL_GetWinRTFSPathUTF8 SDL_GetWinRTFSPathUTF8_renamed_SDL_GetWinRTFSPath
#define SDL_iOSSetAnimationCallback SDL_iOSSetAnimationCallback_renamed_SDL_SetiOSAnimationCallback
#define SDL_iOSSetEventPump SDL_iOSSetEventPump_renamed_SDL_SetiOSEventPump
#define SDL_iPhoneSetAnimationCallback SDL_iPhoneSetAnimationCallback_renamed_SDL_iOSSetAnimationCallback

View File

@@ -173,7 +173,7 @@
#endif
#if WINAPI_FAMILY_WINRT
#define SDL_PLATFORM_WINRT 1
#error Windows RT/UWP is no longer supported in SDL
#elif defined(_GAMING_DESKTOP) /* GDK project configuration always defines _GAMING_XXX */
#define SDL_PLATFORM_WINGDK 1
#elif defined(_GAMING_XBOX_XBOXONE)

View File

@@ -559,90 +559,6 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int
#endif /* SDL_PLATFORM_ANDROID */
/*
* Platform specific functions for WinRT
*/
#ifdef SDL_PLATFORM_WINRT
/**
* WinRT / Windows Phone path types
*
* \since This enum is available since SDL 3.0.0.
*/
typedef enum SDL_WinRT_Path
{
/** The installed app's root directory.
Files here are likely to be read-only. */
SDL_WINRT_PATH_INSTALLED_LOCATION,
/** The app's local data store. Files may be written here */
SDL_WINRT_PATH_LOCAL_FOLDER,
/** The app's roaming data store. Unsupported on Windows Phone.
Files written here may be copied to other machines via a network
connection.
*/
SDL_WINRT_PATH_ROAMING_FOLDER,
/** The app's temporary data store. Unsupported on Windows Phone.
Files written here may be deleted at any time. */
SDL_WINRT_PATH_TEMP_FOLDER
} SDL_WinRT_Path;
/**
* WinRT Device Family
*
* \since This enum is available since SDL 3.0.0.
*/
typedef enum SDL_WinRT_DeviceFamily
{
/** Unknown family */
SDL_WINRT_DEVICEFAMILY_UNKNOWN,
/** Desktop family*/
SDL_WINRT_DEVICEFAMILY_DESKTOP,
/** Mobile family (for example smartphone) */
SDL_WINRT_DEVICEFAMILY_MOBILE,
/** XBox family */
SDL_WINRT_DEVICEFAMILY_XBOX,
} SDL_WinRT_DeviceFamily;
/**
* Retrieve a WinRT defined path on the local file system.
*
* Not all paths are available on all versions of Windows. This is especially
* true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
* for more information on which path types are supported where.
*
* Documentation on most app-specific path types on WinRT can be found on
* MSDN, at the URL:
*
* https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
*
* \param pathType the type of path to retrieve, one of SDL_WinRT_Path.
* \returns a UTF-8 string (8-bit, multi-byte) containing the path, or NULL if
* the path is not available for any reason; call SDL_GetError() for
* more information.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC const char * SDLCALL SDL_GetWinRTFSPath(SDL_WinRT_Path pathType);
/**
* Detects the device family of WinRT platform at runtime.
*
* \returns a value from the SDL_WinRT_DeviceFamily enum.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_GetWinRTDeviceFamily();
#endif /* SDL_PLATFORM_WINRT */
/**
* Query if the current device is a tablet.
*

View File

@@ -36,7 +36,7 @@
#include <SDL3/SDL_atomic.h>
#include <SDL3/SDL_mutex.h>
#if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)) && !defined(SDL_PLATFORM_WINRT)
#if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
#include <process.h> /* _beginthreadex() and _endthreadex() */
#endif
@@ -263,7 +263,7 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithProperties(SDL_Prop
/* The real implementation, hidden from the wiki, so it can show this as real functions that don't have macro magic. */
#ifndef SDL_WIKI_DOCUMENTATION_SECTION
# if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)) && !defined(SDL_PLATFORM_WINRT)
# if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
# ifndef SDL_BeginThreadFunction
# define SDL_BeginThreadFunction _beginthreadex
# endif

View File

@@ -1215,11 +1215,6 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowParent(SDL_Window *window)
* - `SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER`: the EGLSurface associated with
* the window
*
* On UWP:
*
* - `SDL_PROP_WINDOW_WINRT_WINDOW_POINTER`: the IInspectable CoreWindow
* associated with the window
*
* On Windows:
*
* - `SDL_PROP_WINDOW_WIN32_HWND_POINTER`: the HWND associated with the window
@@ -1286,7 +1281,6 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window
#define SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER "SDL.window.vivante.display"
#define SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER "SDL.window.vivante.window"
#define SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER "SDL.window.vivante.surface"
#define SDL_PROP_WINDOW_WINRT_WINDOW_POINTER "SDL.window.winrt.window"
#define SDL_PROP_WINDOW_WIN32_HWND_POINTER "SDL.window.win32.hwnd"
#define SDL_PROP_WINDOW_WIN32_HDC_POINTER "SDL.window.win32.hdc"
#define SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER "SDL.window.win32.instance"

View File

@@ -33,8 +33,6 @@
/* Add any platform that doesn't build using the configure system. */
#if defined(SDL_PLATFORM_WIN32)
#include "SDL_build_config_windows.h"
#elif defined(SDL_PLATFORM_WINRT)
#include "SDL_build_config_winrt.h"
#elif defined(SDL_PLATFORM_WINGDK)
#include "SDL_build_config_wingdk.h"
#elif defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)

View File

@@ -396,7 +396,6 @@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@
@@ -457,7 +456,6 @@
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@

View File

@@ -242,9 +242,7 @@ typedef unsigned int uintptr_t;
#define SDL_JOYSTICK_GAMEINPUT 1
#endif
#define SDL_JOYSTICK_HIDAPI 1
#ifndef SDL_PLATFORM_WINRT
#define SDL_JOYSTICK_RAWINPUT 1
#endif
#define SDL_JOYSTICK_VIRTUAL 1
#ifdef HAVE_WINDOWS_GAMING_INPUT_H
#define SDL_JOYSTICK_WGI 1

View File

@@ -1,229 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_build_config_winrt_h_
#define SDL_build_config_winrt_h_
#define SDL_build_config_h_
#include <SDL3/SDL_platform_defines.h>
/* Make sure the Windows SDK's NTDDI_VERSION macro gets defined. This is used
by SDL to determine which version of the Windows SDK is being used.
*/
#include <sdkddkver.h>
/* Define possibly-undefined NTDDI values (used when compiling SDL against
older versions of the Windows SDK.
*/
#ifndef NTDDI_WINBLUE
#define NTDDI_WINBLUE 0x06030000
#endif
#ifndef NTDDI_WIN10
#define NTDDI_WIN10 0x0A000000
#endif
/* This is a set of defines to configure the SDL features */
#ifdef __clang__
# define HAVE_GCC_ATOMICS 1
#endif
/* Useful headers */
#define HAVE_DXGI_H 1
#if !SDL_WINAPI_FAMILY_PHONE
#define HAVE_XINPUT_H 1
#endif
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_TPCSHRD_H 1
#define HAVE_LIBC 1
#define HAVE_FLOAT_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MATH_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDBOOL_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_WCHAR_H 1
/* C library functions */
#define HAVE_LIBC 1
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
#define HAVE_ABS 1
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_STRLEN 1
#define HAVE__STRREV 1
#define HAVE__STRUPR 1
#define HAVE_STRCHR 1
#define HAVE_STRPBRK 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
/* #undef HAVE_STRTOLL */
/* #undef HAVE_STRTOULL */
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_VSNPRINTF 1
/* TODO, WinRT: consider using ??_s versions of the following */
/* #undef HAVE__STRLWR */
/* #undef HAVE_ITOA */
/* #undef HAVE__LTOA */
/* #undef HAVE__ULTOA */
/* #undef HAVE_SSCANF */
#define HAVE_ACOS 1
#define HAVE_ACOSF 1
#define HAVE_ASIN 1
#define HAVE_ASINF 1
#define HAVE_ATAN 1
#define HAVE_ATANF 1
#define HAVE_ATAN2 1
#define HAVE_ATAN2F 1
#define HAVE_CEIL 1
#define HAVE_CEILF 1
#define HAVE__COPYSIGN 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1
#define HAVE_FABSF 1
#define HAVE_FLOOR 1
#define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_ISINF 1
#define HAVE_ISINF_FLOAT_MACRO 1
#define HAVE_ISNAN 1
#define HAVE_ISNAN_FLOAT_MACRO 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
#define HAVE_LOG10F 1
#define HAVE_LROUND 1
#define HAVE_LROUNDF 1
#define HAVE_MODF 1
#define HAVE_MODFF 1
#define HAVE_POW 1
#define HAVE_POWF 1
#define HAVE_ROUND 1
#define HAVE_ROUNDF 1
#define HAVE__SCALB 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
#define HAVE_TRUNC 1
#define HAVE_TRUNCF 1
#define HAVE__FSEEKI64 1
#define HAVE_ROAPI_H 1
/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_WASAPI 1
#define SDL_AUDIO_DRIVER_DISK 1
#define SDL_AUDIO_DRIVER_DUMMY 1
/* Enable various input drivers */
#if SDL_WINAPI_FAMILY_PHONE
#define SDL_JOYSTICK_DISABLED 1
#define SDL_HAPTIC_DISABLED 1
#else
#define SDL_JOYSTICK_VIRTUAL 1
#if (NTDDI_VERSION >= NTDDI_WIN10)
#define SDL_JOYSTICK_WGI 1
#define SDL_HAPTIC_DISABLED 1
#else
#define SDL_JOYSTICK_XINPUT 1
#endif /* WIN10 */
#endif
/* WinRT doesn't have HIDAPI available */
#define SDL_HIDAPI_DISABLED 1
/* Enable the dummy sensor driver */
#define SDL_SENSOR_DUMMY 1
/* Enable various shared object loading systems */
#define SDL_LOADSO_WINDOWS 1
/* Enable various threading systems */
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
#define SDL_THREAD_GENERIC_COND_SUFFIX 1
#define SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1
#define SDL_THREAD_WINDOWS 1
#else
/* WinRT on Windows 8.0 and Windows Phone 8.0 don't support CreateThread() */
#define SDL_THREAD_STDCPP 1
#endif
/* Enable RTC system */
#define SDL_TIME_WINDOWS 1
/* Enable various timer systems */
#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
#define SDL_VIDEO_DRIVER_WINRT 1
#define SDL_VIDEO_DRIVER_DUMMY 1
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
#define SDL_VIDEO_OPENGL_ES2 1
#define SDL_VIDEO_OPENGL_EGL 1
/* Enable appropriate renderer(s) */
#define SDL_VIDEO_RENDER_D3D11 1
/* Disable D3D12 as it's not implemented for WinRT */
/* #undef SDL_VIDEO_RENDER_D3D12 */
#ifdef SDL_VIDEO_OPENGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 1
#endif
/* Enable system power support */
#define SDL_POWER_WINRT 1
/* Enable filesystem support */
#define SDL_FILESYSTEM_WINDOWS 1
#define SDL_FSOPS_WINDOWS 1
/* Enable the camera driver (src/camera/dummy/\*.c) */ /* !!! FIXME */
#define SDL_CAMERA_DRIVER_DUMMY 1
#endif /* SDL_build_config_winrt_h_ */