Merge fb3b27f891
into b728de788e
This commit is contained in:
commit
ee4348d38e
|
@ -120,7 +120,7 @@ typedef enum
|
|||
typedef struct SDL_AssertData
|
||||
{
|
||||
int always_ignore;
|
||||
unsigned int trigger_count;
|
||||
int trigger_count;
|
||||
const char *condition;
|
||||
const char *filename;
|
||||
int linenum;
|
||||
|
|
|
@ -181,9 +181,9 @@ typedef struct SDL_AudioSpec
|
|||
{
|
||||
int freq; /**< DSP frequency -- samples per second */
|
||||
SDL_AudioFormat format; /**< Audio data format */
|
||||
Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */
|
||||
Sint8 channels; /**< Number of channels: 1 mono, 2 stereo */
|
||||
Uint8 silence; /**< Audio buffer silence value (calculated) */
|
||||
Uint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */
|
||||
Sint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */
|
||||
Uint16 padding; /**< Necessary for some compile environments */
|
||||
Uint32 size; /**< Audio buffer size in bytes (calculated) */
|
||||
SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */
|
||||
|
|
|
@ -308,7 +308,7 @@ typedef struct SDL_Palette
|
|||
{
|
||||
int ncolors;
|
||||
SDL_Color *colors;
|
||||
Uint32 version;
|
||||
int version;
|
||||
int refcount;
|
||||
} SDL_Palette;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ typedef struct SDL_RendererInfo
|
|||
{
|
||||
const char *name; /**< The name of the renderer */
|
||||
Uint32 flags; /**< Supported ::SDL_RendererFlags */
|
||||
Uint32 num_texture_formats; /**< The number of available texture formats */
|
||||
Sint32 num_texture_formats; /**< The number of available texture formats */
|
||||
Uint32 texture_formats[16]; /**< The available texture formats */
|
||||
int max_texture_width; /**< The maximum texture width */
|
||||
int max_texture_height; /**< The maximum texture height */
|
||||
|
|
|
@ -66,7 +66,7 @@ extern "C" {
|
|||
*
|
||||
* \sa SDL_DestroyWindow
|
||||
*/
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title, int x, int y, int w, int h,Uint32 flags);
|
||||
|
||||
/**
|
||||
* Return whether the given window is a shaped window.
|
||||
|
|
|
@ -50,9 +50,9 @@ extern "C" {
|
|||
*/
|
||||
typedef struct SDL_version
|
||||
{
|
||||
Uint8 major; /**< major version */
|
||||
Uint8 minor; /**< minor version */
|
||||
Uint8 patch; /**< update version */
|
||||
Sint8 major; /**< major version */
|
||||
Sint8 minor; /**< minor version */
|
||||
Sint8 patch; /**< update version */
|
||||
} SDL_version;
|
||||
|
||||
/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
|
||||
|
|
|
@ -150,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
|||
* required extensions, SDL_FALSE will be returned instead of SDL_TRUE, to
|
||||
* indicate that not all the required extensions were returned.
|
||||
*
|
||||
* \param pCount A pointer to an unsigned int corresponding to the number of
|
||||
* \param pCount A pointer to an int corresponding to the number of
|
||||
* extensions to be returned
|
||||
* \param pNames NULL or a pointer to an array to be filled with required
|
||||
* Vulkan instance extensions
|
||||
|
@ -160,7 +160,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
|||
*
|
||||
* \sa SDL_Vulkan_CreateSurface
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(unsigned int *pCount,
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(int *pCount,
|
||||
const char **pNames);
|
||||
|
||||
/**
|
||||
|
|
|
@ -165,7 +165,7 @@ SDL_DYNAPI_PROC(SDL_Palette*,SDL_CreatePalette,(int a),(a),return)
|
|||
SDL_DYNAPI_PROC(SDL_PixelFormat*,SDL_CreatePixelFormat,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateRenderer,(SDL_Window *a, const char *b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_sem*,SDL_CreateSemaphore,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateShapedWindow,(const char *a, unsigned int b, unsigned int c, unsigned int d, unsigned int e, Uint32 f),(a,b,c,d,e,f),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateShapedWindow,(const char *a, int b, int c, int d, int e, Uint32 f),(a,b,c,d,e,f),return)
|
||||
SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateSoftwareRenderer,(SDL_Surface *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateSurface,(int a, int b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateSurfaceFrom,(void *a, int b, int c, int d, Uint32 e),(a,b,c,d,e),return)
|
||||
|
@ -736,7 +736,7 @@ SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurface,(SDL_Window *a),(a),return)
|
|||
SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurfaceRects,(SDL_Window *a, const SDL_Rect *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_Vulkan_CreateSurface,(SDL_Window *a, VkInstance b, VkSurfaceKHR *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_Vulkan_GetInstanceExtensions,(unsigned int *a, const char **b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_Vulkan_GetInstanceExtensions,(int *a, const char **b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_FunctionPointer,SDL_Vulkan_GetVkGetInstanceProcAddr,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_Vulkan_LoadLibrary,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_Vulkan_UnloadLibrary,(void),(),)
|
||||
|
|
|
@ -1066,7 +1066,7 @@ static SDL_bool IsSupportedBlendMode(SDL_Renderer *renderer, SDL_BlendMode blend
|
|||
|
||||
static SDL_bool IsSupportedFormat(SDL_Renderer *renderer, Uint32 format)
|
||||
{
|
||||
Uint32 i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
|
||||
if (renderer->info.texture_formats[i] == format) {
|
||||
|
@ -1078,7 +1078,7 @@ static SDL_bool IsSupportedFormat(SDL_Renderer *renderer, Uint32 format)
|
|||
|
||||
static Uint32 GetClosestSupportedFormat(SDL_Renderer *renderer, Uint32 format)
|
||||
{
|
||||
Uint32 i;
|
||||
int i;
|
||||
|
||||
if (SDL_ISPIXELFORMAT_FOURCC(format)) {
|
||||
/* Look for an exact match */
|
||||
|
@ -1269,14 +1269,14 @@ SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *s
|
|||
/* No alpha, but a colorkey => promote to alpha */
|
||||
if (!fmt->Amask && SDL_SurfaceHasColorKey(surface)) {
|
||||
if (fmt->format == SDL_PIXELFORMAT_RGB888) {
|
||||
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
|
||||
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
|
||||
if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ARGB8888) {
|
||||
format = SDL_PIXELFORMAT_ARGB8888;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (fmt->format == SDL_PIXELFORMAT_BGR888) {
|
||||
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
|
||||
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
|
||||
if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ABGR8888) {
|
||||
format = SDL_PIXELFORMAT_ABGR8888;
|
||||
break;
|
||||
|
@ -1285,7 +1285,7 @@ SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *s
|
|||
}
|
||||
} else {
|
||||
/* Exact match would be fine */
|
||||
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
|
||||
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
|
||||
if (renderer->info.texture_formats[i] == fmt->format) {
|
||||
format = fmt->format;
|
||||
break;
|
||||
|
@ -1296,7 +1296,7 @@ SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *s
|
|||
/* Fallback, choose a valid pixel format */
|
||||
if (format == SDL_PIXELFORMAT_UNKNOWN) {
|
||||
format = renderer->info.texture_formats[0];
|
||||
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
|
||||
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
|
||||
if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
|
||||
SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) {
|
||||
format = renderer->info.texture_formats[i];
|
||||
|
|
|
@ -1040,7 +1040,7 @@ static void SDLTest_PrintRenderer(SDL_RendererInfo *info)
|
|||
SDL_Log("%s\n", text);
|
||||
|
||||
(void)SDL_snprintf(text, sizeof text, " Texture formats (%" SDL_PRIu32 "): ", info->num_texture_formats);
|
||||
for (i = 0; i < (int)info->num_texture_formats; ++i) {
|
||||
for (i = 0; i < info->num_texture_formats; ++i) {
|
||||
if (i > 0) {
|
||||
SDL_snprintfcat(text, sizeof text, ", ");
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "SDL_shape_internals.h"
|
||||
|
||||
SDL_Window *
|
||||
SDL_CreateShapedWindow(const char *title, unsigned int x, unsigned int y, unsigned int w, unsigned int h, Uint32 flags)
|
||||
SDL_CreateShapedWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
|
||||
{
|
||||
SDL_Window *result = NULL;
|
||||
result = SDL_CreateWindow(title, -1000, -1000, w, h, (flags | SDL_WINDOW_BORDERLESS) & (~SDL_WINDOW_FULLSCREEN) & (~SDL_WINDOW_RESIZABLE));
|
||||
|
|
|
@ -307,7 +307,7 @@ struct SDL_VideoDevice
|
|||
*/
|
||||
int (*Vulkan_LoadLibrary)(_THIS, const char *path);
|
||||
void (*Vulkan_UnloadLibrary)(_THIS);
|
||||
SDL_bool (*Vulkan_GetInstanceExtensions)(_THIS, unsigned *count, const char **names);
|
||||
SDL_bool (*Vulkan_GetInstanceExtensions)(_THIS, int *count, const char **names);
|
||||
SDL_bool (*Vulkan_CreateSurface)(_THIS, SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface);
|
||||
|
||||
/* * * */
|
||||
|
|
|
@ -4735,7 +4735,7 @@ void SDL_Vulkan_UnloadLibrary(void)
|
|||
}
|
||||
}
|
||||
|
||||
SDL_bool SDL_Vulkan_GetInstanceExtensions(unsigned *count, const char **names)
|
||||
SDL_bool SDL_Vulkan_GetInstanceExtensions(int *count, const char **names)
|
||||
{
|
||||
if (count == NULL) {
|
||||
SDL_InvalidParamError("count");
|
||||
|
|
|
@ -65,9 +65,9 @@ extern VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList(
|
|||
|
||||
/* Implements functionality of SDL_Vulkan_GetInstanceExtensions for a list of
|
||||
* names passed in nameCount and names. */
|
||||
extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
|
||||
extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(int *userCount,
|
||||
const char **userNames,
|
||||
unsigned nameCount,
|
||||
int nameCount,
|
||||
const char *const *names);
|
||||
|
||||
/* Create a surface directly from a display connected to a physical device
|
||||
|
|
|
@ -167,13 +167,13 @@ VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList(
|
|||
return retval;
|
||||
}
|
||||
|
||||
SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
|
||||
SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(int *userCount,
|
||||
const char **userNames,
|
||||
unsigned nameCount,
|
||||
int nameCount,
|
||||
const char *const *names)
|
||||
{
|
||||
if (userNames) {
|
||||
unsigned i;
|
||||
int i;
|
||||
|
||||
if (*userCount < nameCount) {
|
||||
SDL_SetError("Output array for SDL_Vulkan_GetInstanceExtensions needs to be at least %d big", nameCount);
|
||||
|
|
|
@ -110,7 +110,7 @@ void Android_Vulkan_UnloadLibrary(_THIS)
|
|||
}
|
||||
|
||||
SDL_bool Android_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names)
|
||||
{
|
||||
static const char *const extensionsForAndroid[] = {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
int Android_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||
void Android_Vulkan_UnloadLibrary(_THIS);
|
||||
SDL_bool Android_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names);
|
||||
SDL_bool Android_Vulkan_CreateSurface(_THIS,
|
||||
SDL_Window *window,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
int Cocoa_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||
void Cocoa_Vulkan_UnloadLibrary(_THIS);
|
||||
SDL_bool Cocoa_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names);
|
||||
SDL_bool Cocoa_Vulkan_CreateSurface(_THIS,
|
||||
SDL_Window *window,
|
||||
|
|
|
@ -164,7 +164,7 @@ void Cocoa_Vulkan_UnloadLibrary(_THIS)
|
|||
}
|
||||
|
||||
SDL_bool Cocoa_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names)
|
||||
{
|
||||
static const char *const extensionsForCocoa[] = {
|
||||
|
|
|
@ -141,7 +141,7 @@ void KMSDRM_Vulkan_UnloadLibrary(_THIS)
|
|||
/* vkCreateInstance(). */
|
||||
/*********************************************************************/
|
||||
SDL_bool KMSDRM_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names)
|
||||
{
|
||||
static const char *const extensionsForKMSDRM[] = {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
int KMSDRM_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||
void KMSDRM_Vulkan_UnloadLibrary(_THIS);
|
||||
SDL_bool KMSDRM_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names);
|
||||
SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS,
|
||||
SDL_Window *window,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
int UIKit_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||
void UIKit_Vulkan_UnloadLibrary(_THIS);
|
||||
SDL_bool UIKit_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names);
|
||||
SDL_bool UIKit_Vulkan_CreateSurface(_THIS,
|
||||
SDL_Window *window,
|
||||
|
|
|
@ -170,7 +170,7 @@ void UIKit_Vulkan_UnloadLibrary(_THIS)
|
|||
}
|
||||
|
||||
SDL_bool UIKit_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names)
|
||||
{
|
||||
static const char *const extensionsForUIKit[] = {
|
||||
|
|
|
@ -117,7 +117,7 @@ void VIVANTE_Vulkan_UnloadLibrary(_THIS)
|
|||
}
|
||||
|
||||
SDL_bool VIVANTE_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names)
|
||||
{
|
||||
static const char *const extensionsForVivante[] = {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
int VIVANTE_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||
void VIVANTE_Vulkan_UnloadLibrary(_THIS);
|
||||
SDL_bool VIVANTE_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names);
|
||||
SDL_bool VIVANTE_Vulkan_CreateSurface(_THIS,
|
||||
SDL_Window *window,
|
||||
|
|
|
@ -116,7 +116,7 @@ void Wayland_Vulkan_UnloadLibrary(_THIS)
|
|||
}
|
||||
|
||||
SDL_bool Wayland_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names)
|
||||
{
|
||||
static const char *const extensionsForWayland[] = {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
int Wayland_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||
void Wayland_Vulkan_UnloadLibrary(_THIS);
|
||||
SDL_bool Wayland_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names);
|
||||
SDL_bool Wayland_Vulkan_CreateSurface(_THIS,
|
||||
SDL_Window *window,
|
||||
|
|
|
@ -111,7 +111,7 @@ void WIN_Vulkan_UnloadLibrary(_THIS)
|
|||
}
|
||||
|
||||
SDL_bool WIN_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names)
|
||||
{
|
||||
static const char *const extensionsForWin32[] = {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
int WIN_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||
void WIN_Vulkan_UnloadLibrary(_THIS);
|
||||
SDL_bool WIN_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names);
|
||||
SDL_bool WIN_Vulkan_CreateSurface(_THIS,
|
||||
SDL_Window *window,
|
||||
|
|
|
@ -141,7 +141,7 @@ void X11_Vulkan_UnloadLibrary(_THIS)
|
|||
}
|
||||
|
||||
SDL_bool X11_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names)
|
||||
{
|
||||
SDL_VideoData *videoData = _this->driverdata;
|
||||
|
|
|
@ -33,7 +33,7 @@ typedef xcb_connection_t *(*PFN_XGetXCBConnection)(Display *dpy);
|
|||
int X11_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||
void X11_Vulkan_UnloadLibrary(_THIS);
|
||||
SDL_bool X11_Vulkan_GetInstanceExtensions(_THIS,
|
||||
unsigned *count,
|
||||
int *count,
|
||||
const char **names);
|
||||
SDL_bool X11_Vulkan_CreateSurface(_THIS,
|
||||
SDL_Window *window,
|
||||
|
|
|
@ -220,7 +220,7 @@ static void createInstance(void)
|
|||
VkApplicationInfo appInfo = { 0 };
|
||||
VkInstanceCreateInfo instanceCreateInfo = { 0 };
|
||||
const char **extensions = NULL;
|
||||
unsigned extensionCount = 0;
|
||||
int extensionCount = 0;
|
||||
VkResult result;
|
||||
|
||||
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
|
||||
|
|
Loading…
Reference in a new issue