Improve support for private platforms (#11220)

This commit is contained in:
Caleb Cornett
2024-10-15 18:02:07 -04:00
committed by GitHub
parent 66d09a1cda
commit 9af5ffcfbe
27 changed files with 70 additions and 18 deletions

View File

@@ -229,6 +229,12 @@ typedef enum SDL_EventType
SDL_EVENT_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
SDL_EVENT_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
/* Reserved events for private platforms */
SDL_EVENT_PRIVATE0 = 0x4000,
SDL_EVENT_PRIVATE1,
SDL_EVENT_PRIVATE2,
SDL_EVENT_PRIVATE3,
/* Internal events */
SDL_EVENT_POLL_SENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */

View File

@@ -49,7 +49,11 @@
#include <SDL3/SDL_events.h>
#ifndef SDL_MAIN_HANDLED
#ifdef SDL_PLATFORM_WIN32
#if defined(SDL_PLATFORM_PRIVATE_MAIN)
/* Private platforms may have their own ideas about entry points. */
#include "SDL_main_private.h"
#elif defined(SDL_PLATFORM_WIN32)
/* On Windows SDL provides WinMain(), which parses the command line and passes
the arguments to your main function.

View File

@@ -68,7 +68,11 @@
unless the real entry point needs to be somewhere else entirely, like Android where it's in Java code */
#if (!defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD)) && !defined(SDL_MAIN_EXPORTED)
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_PRIVATE_MAIN)
/* Private platforms may have their own ideas about entry points. */
#include "SDL_main_impl_private.h"
#elif defined(SDL_PLATFORM_WINDOWS)
/* these defines/typedefs are needed for the WinMain() definition */
#ifndef WINAPI