early-access version 1780

This commit is contained in:
pineappleEA
2021-06-11 20:56:03 +02:00
parent e46a402c25
commit 388881fdbb
93 changed files with 2410 additions and 851 deletions

View File

@@ -302,6 +302,7 @@
/* Enable various input drivers */
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
#cmakedefine SDL_INPUT_FBSDKBIO @SDL_INPUT_FBSDKBIO@
#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@

View File

@@ -1659,6 +1659,17 @@ extern "C" {
*/
#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
/**
* \brief Mark X11 windows as override-redirect.
*
* If set, this _might_ increase framerate at the expense of the desktop
* not working as expected. Override-redirect windows aren't noticed by the
* window manager at all.
*
* You should probably only use this for fullscreen windows, and you probably
* shouldn't even use it for that. But it's here if you want to try!
*/
#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
/**
* \brief An enumeration of hint priorities

View File

@@ -481,16 +481,28 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
size_t _n = (dwords + 3) / 4;
Uint32 *_p = SDL_static_cast(Uint32 *, dst);
Uint32 _val = (val);
if (dwords == 0)
if (dwords == 0) {
return;
switch (dwords % 4)
{
}
/* !!! FIXME: there are better ways to do this, but this is just to clean this up for now. */
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
#endif
switch (dwords % 4) {
case 0: do { *_p++ = _val; /* fallthrough */
case 3: *_p++ = _val; /* fallthrough */
case 2: *_p++ = _val; /* fallthrough */
case 1: *_p++ = _val; /* fallthrough */
} while ( --_n );
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif
}

View File

@@ -206,6 +206,14 @@ void SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *do
*/
void SDLTest_CommonQuit(SDLTest_CommonState * state);
/**
* \brief Draws various window information (position, size, etc.) to the renderer.
*
* \param renderer The renderer to draw to.
* \param window The window whose information should be displayed.
*
*/
void SDLTest_CommonDrawWindowInfo(SDL_Renderer * renderer, SDL_Window * window);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus

View File

@@ -35,6 +35,17 @@
#include "SDL_atomic.h"
#include "SDL_mutex.h"
#if defined(__WIN32__)
#include <process.h> /* _beginthreadex() and _endthreadex() */
#endif
#if defined(__OS2__) /* for _beginthread() and _endthread() */
#ifndef __EMX__
#include <process.h>
#else
#include <stdlib.h>
#endif
#endif
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
@@ -99,7 +110,6 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
* library!
*/
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
#include <process.h> /* _beginthreadex() and _endthreadex() */
typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread)
(void *, unsigned, unsigned (__stdcall *func)(void *),
@@ -148,12 +158,6 @@ SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
*/
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
#ifndef __EMX__
#include <process.h>
#else
#include <stdlib.h>
#endif
typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
typedef void (*pfnSDL_CurrentEndThread)(void);

View File

@@ -65,6 +65,7 @@ typedef struct
* \sa SDL_CreateWindow()
* \sa SDL_CreateWindowFrom()
* \sa SDL_DestroyWindow()
* \sa SDL_FlashWindow()
* \sa SDL_GetWindowData()
* \sa SDL_GetWindowFlags()
* \sa SDL_GetWindowGrab()
@@ -1509,6 +1510,18 @@ extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
SDL_HitTest callback,
void *callback_data);
/**
* Request a window to give a signal, e.g. a visual signal, to demand attention from the user.
*
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \param window the window to request the flashing for
* \param flash_count number of times the window gets flashed on systems that support flashing the
* window multiple times, like Windows, else it is ignored
*/
extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, Uint32 flash_count);
/**
* Destroy a window.
*