Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h
parent
0d011ec66d
commit
50efbda736
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "SDL.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_syswm.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_events_c.h"
|
||||
#include "../timer/SDL_timer_c.h"
|
||||
|
@ -32,6 +31,7 @@
|
|||
#include "../joystick/SDL_joystick_c.h"
|
||||
#endif
|
||||
#include "../video/SDL_sysvideo.h"
|
||||
#include "SDL_syswm.h"
|
||||
|
||||
/*#define SDL_DEBUG_EVENTS 1*/
|
||||
|
||||
|
|
|
@ -207,8 +207,8 @@ struct SDL_VideoDevice
|
|||
/*
|
||||
* Window functions
|
||||
*/
|
||||
int (*CreateWindow) (_THIS, SDL_Window * window);
|
||||
int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
|
||||
int (*CreateSDLWindow) (_THIS, SDL_Window * window);
|
||||
int (*CreateSDLWindowFrom) (_THIS, SDL_Window * window, const void *data);
|
||||
void (*SetWindowTitle) (_THIS, SDL_Window * window);
|
||||
void (*SetWindowIcon) (_THIS, SDL_Window * window, SDL_Surface * icon);
|
||||
void (*SetWindowPosition) (_THIS, SDL_Window * window);
|
||||
|
|
|
@ -52,11 +52,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* On Windows, windows.h defines CreateWindow */
|
||||
#ifdef CreateWindow
|
||||
#undef CreateWindow
|
||||
#endif
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
|
@ -1479,7 +1474,7 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
|
|||
}
|
||||
_this->windows = window;
|
||||
|
||||
if (_this->CreateWindow && _this->CreateWindow(_this, window) < 0) {
|
||||
if (_this->CreateSDLWindow && _this->CreateSDLWindow(_this, window) < 0) {
|
||||
SDL_DestroyWindow(window);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1516,7 +1511,7 @@ SDL_CreateWindowFrom(const void *data)
|
|||
SDL_UninitializedVideo();
|
||||
return NULL;
|
||||
}
|
||||
if (!_this->CreateWindowFrom) {
|
||||
if (!_this->CreateSDLWindowFrom) {
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1538,7 +1533,7 @@ SDL_CreateWindowFrom(const void *data)
|
|||
}
|
||||
_this->windows = window;
|
||||
|
||||
if (_this->CreateWindowFrom(_this, window, data) < 0) {
|
||||
if (_this->CreateSDLWindowFrom(_this, window, data) < 0) {
|
||||
SDL_DestroyWindow(window);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1602,8 +1597,8 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
|
|||
window->last_fullscreen_flags = window->flags;
|
||||
window->is_destroying = SDL_FALSE;
|
||||
|
||||
if (_this->CreateWindow && !(flags & SDL_WINDOW_FOREIGN)) {
|
||||
if (_this->CreateWindow(_this, window) < 0) {
|
||||
if (_this->CreateSDLWindow && !(flags & SDL_WINDOW_FOREIGN)) {
|
||||
if (_this->CreateSDLWindow(_this, window) < 0) {
|
||||
if (loaded_opengl) {
|
||||
SDL_GL_UnloadLibrary();
|
||||
window->flags &= ~SDL_WINDOW_OPENGL;
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#endif
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
#define VK_USE_PLATFORM_WIN32_KHR
|
||||
#include "../core/windows/SDL_windows.h"
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_X11
|
||||
#define VK_USE_PLATFORM_XLIB_KHR
|
||||
|
|
|
@ -115,7 +115,7 @@ Android_CreateDevice(int devindex)
|
|||
device->VideoQuit = Android_VideoQuit;
|
||||
device->PumpEvents = Android_PumpEvents;
|
||||
|
||||
device->CreateWindow = Android_CreateWindow;
|
||||
device->CreateSDLWindow = Android_CreateWindow;
|
||||
device->SetWindowTitle = Android_SetWindowTitle;
|
||||
device->DestroyWindow = Android_DestroyWindow;
|
||||
device->GetWindowWMInfo = Android_GetWindowWMInfo;
|
||||
|
|
|
@ -81,8 +81,8 @@ Cocoa_CreateDevice(int devindex)
|
|||
device->PumpEvents = Cocoa_PumpEvents;
|
||||
device->SuspendScreenSaver = Cocoa_SuspendScreenSaver;
|
||||
|
||||
device->CreateWindow = Cocoa_CreateWindow;
|
||||
device->CreateWindowFrom = Cocoa_CreateWindowFrom;
|
||||
device->CreateSDLWindow = Cocoa_CreateWindow;
|
||||
device->CreateSDLWindowFrom = Cocoa_CreateWindowFrom;
|
||||
device->SetWindowTitle = Cocoa_SetWindowTitle;
|
||||
device->SetWindowIcon = Cocoa_SetWindowIcon;
|
||||
device->SetWindowPosition = Cocoa_SetWindowPosition;
|
||||
|
|
|
@ -109,8 +109,8 @@ DirectFB_CreateDevice(int devindex)
|
|||
device->GetDisplayModes = DirectFB_GetDisplayModes;
|
||||
device->SetDisplayMode = DirectFB_SetDisplayMode;
|
||||
device->PumpEvents = DirectFB_PumpEventsWindow;
|
||||
device->CreateWindow = DirectFB_CreateWindow;
|
||||
device->CreateWindowFrom = DirectFB_CreateWindowFrom;
|
||||
device->CreateSDLWindow = DirectFB_CreateWindow;
|
||||
device->CreateSDLWindowFrom = DirectFB_CreateWindowFrom;
|
||||
device->SetWindowTitle = DirectFB_SetWindowTitle;
|
||||
device->SetWindowIcon = DirectFB_SetWindowIcon;
|
||||
device->SetWindowPosition = DirectFB_SetWindowPosition;
|
||||
|
|
|
@ -91,8 +91,7 @@ Emscripten_CreateDevice(int devindex)
|
|||
|
||||
device->PumpEvents = Emscripten_PumpEvents;
|
||||
|
||||
device->CreateWindow = Emscripten_CreateWindow;
|
||||
/*device->CreateWindowFrom = Emscripten_CreateWindowFrom;*/
|
||||
device->CreateSDLWindow = Emscripten_CreateWindow;
|
||||
device->SetWindowTitle = Emscripten_SetWindowTitle;
|
||||
/*device->SetWindowIcon = Emscripten_SetWindowIcon;
|
||||
device->SetWindowPosition = Emscripten_SetWindowPosition;*/
|
||||
|
|
|
@ -68,8 +68,8 @@ BE_CreateDevice(int devindex)
|
|||
device->SetDisplayMode = BE_SetDisplayMode;
|
||||
device->PumpEvents = BE_PumpEvents;
|
||||
|
||||
device->CreateWindow = BE_CreateWindow;
|
||||
device->CreateWindowFrom = BE_CreateWindowFrom;
|
||||
device->CreateSDLWindow = BE_CreateWindow;
|
||||
device->CreateSDLWindowFrom = BE_CreateWindowFrom;
|
||||
device->SetWindowTitle = BE_SetWindowTitle;
|
||||
device->SetWindowIcon = BE_SetWindowIcon;
|
||||
device->SetWindowPosition = BE_SetWindowPosition;
|
||||
|
|
|
@ -120,8 +120,8 @@ KMSDRM_Create(int devindex)
|
|||
device->VideoQuit = KMSDRM_VideoQuit;
|
||||
device->GetDisplayModes = KMSDRM_GetDisplayModes;
|
||||
device->SetDisplayMode = KMSDRM_SetDisplayMode;
|
||||
device->CreateWindow = KMSDRM_CreateWindow;
|
||||
device->CreateWindowFrom = KMSDRM_CreateWindowFrom;
|
||||
device->CreateSDLWindow = KMSDRM_CreateWindow;
|
||||
device->CreateSDLWindowFrom = KMSDRM_CreateWindowFrom;
|
||||
device->SetWindowTitle = KMSDRM_SetWindowTitle;
|
||||
device->SetWindowIcon = KMSDRM_SetWindowIcon;
|
||||
device->SetWindowPosition = KMSDRM_SetWindowPosition;
|
||||
|
|
|
@ -180,7 +180,7 @@ MIR_CreateDevice(int device_index)
|
|||
device->GL_GetProcAddress = MIR_GL_GetProcAddress;
|
||||
|
||||
/* mirwindow */
|
||||
device->CreateWindow = MIR_CreateWindow;
|
||||
device->CreateSDLWindow = MIR_CreateWindow;
|
||||
device->DestroyWindow = MIR_DestroyWindow;
|
||||
device->GetWindowWMInfo = MIR_GetWindowWMInfo;
|
||||
device->SetWindowFullscreen = MIR_SetWindowFullscreen;
|
||||
|
@ -197,7 +197,7 @@ MIR_CreateDevice(int device_index)
|
|||
device->SetWindowGammaRamp = MIR_SetWindowGammaRamp;
|
||||
device->GetWindowGammaRamp = MIR_GetWindowGammaRamp;
|
||||
|
||||
device->CreateWindowFrom = NULL;
|
||||
device->CreateSDLWindowFrom = NULL;
|
||||
device->SetWindowIcon = NULL;
|
||||
device->RaiseWindow = NULL;
|
||||
device->SetWindowBordered = NULL;
|
||||
|
|
|
@ -107,7 +107,7 @@ static SDL_VideoDevice *NACL_CreateDevice(int devindex) {
|
|||
device->VideoQuit = NACL_VideoQuit;
|
||||
device->PumpEvents = NACL_PumpEvents;
|
||||
|
||||
device->CreateWindow = NACL_CreateWindow;
|
||||
device->CreateSDLWindow = NACL_CreateWindow;
|
||||
device->SetWindowTitle = NACL_SetWindowTitle;
|
||||
device->DestroyWindow = NACL_DestroyWindow;
|
||||
|
||||
|
|
|
@ -102,8 +102,8 @@ PND_create()
|
|||
device->VideoQuit = PND_videoquit;
|
||||
device->GetDisplayModes = PND_getdisplaymodes;
|
||||
device->SetDisplayMode = PND_setdisplaymode;
|
||||
device->CreateWindow = PND_createwindow;
|
||||
device->CreateWindowFrom = PND_createwindowfrom;
|
||||
device->CreateSDLWindow = PND_createwindow;
|
||||
device->CreateSDLWindowFrom = PND_createwindowfrom;
|
||||
device->SetWindowTitle = PND_setwindowtitle;
|
||||
device->SetWindowIcon = PND_setwindowicon;
|
||||
device->SetWindowPosition = PND_setwindowposition;
|
||||
|
|
|
@ -113,8 +113,8 @@ PSP_Create()
|
|||
device->VideoQuit = PSP_VideoQuit;
|
||||
device->GetDisplayModes = PSP_GetDisplayModes;
|
||||
device->SetDisplayMode = PSP_SetDisplayMode;
|
||||
device->CreateWindow = PSP_CreateWindow;
|
||||
device->CreateWindowFrom = PSP_CreateWindowFrom;
|
||||
device->CreateSDLWindow = PSP_CreateWindow;
|
||||
device->CreateSDLWindowFrom = PSP_CreateWindowFrom;
|
||||
device->SetWindowTitle = PSP_SetWindowTitle;
|
||||
device->SetWindowIcon = PSP_SetWindowIcon;
|
||||
device->SetWindowPosition = PSP_SetWindowPosition;
|
||||
|
|
|
@ -330,7 +330,7 @@ createDevice(int devindex)
|
|||
device->driverdata = NULL;
|
||||
device->VideoInit = videoInit;
|
||||
device->VideoQuit = videoQuit;
|
||||
device->CreateWindow = createWindow;
|
||||
device->CreateSDLWindow = createWindow;
|
||||
device->CreateWindowFramebuffer = createWindowFramebuffer;
|
||||
device->UpdateWindowFramebuffer = updateWindowFramebuffer;
|
||||
device->SetWindowSize = setWindowSize;
|
||||
|
|
|
@ -97,8 +97,8 @@ RPI_Create()
|
|||
device->VideoQuit = RPI_VideoQuit;
|
||||
device->GetDisplayModes = RPI_GetDisplayModes;
|
||||
device->SetDisplayMode = RPI_SetDisplayMode;
|
||||
device->CreateWindow = RPI_CreateWindow;
|
||||
device->CreateWindowFrom = RPI_CreateWindowFrom;
|
||||
device->CreateSDLWindow = RPI_CreateWindow;
|
||||
device->CreateSDLWindowFrom = RPI_CreateWindowFrom;
|
||||
device->SetWindowTitle = RPI_SetWindowTitle;
|
||||
device->SetWindowIcon = RPI_SetWindowIcon;
|
||||
device->SetWindowPosition = RPI_SetWindowPosition;
|
||||
|
|
|
@ -91,7 +91,7 @@ UIKit_CreateDevice(int devindex)
|
|||
device->SetDisplayMode = UIKit_SetDisplayMode;
|
||||
device->PumpEvents = UIKit_PumpEvents;
|
||||
device->SuspendScreenSaver = UIKit_SuspendScreenSaver;
|
||||
device->CreateWindow = UIKit_CreateWindow;
|
||||
device->CreateSDLWindow = UIKit_CreateWindow;
|
||||
device->SetWindowTitle = UIKit_SetWindowTitle;
|
||||
device->ShowWindow = UIKit_ShowWindow;
|
||||
device->HideWindow = UIKit_HideWindow;
|
||||
|
|
|
@ -88,7 +88,7 @@ VIVANTE_Create()
|
|||
device->VideoQuit = VIVANTE_VideoQuit;
|
||||
device->GetDisplayModes = VIVANTE_GetDisplayModes;
|
||||
device->SetDisplayMode = VIVANTE_SetDisplayMode;
|
||||
device->CreateWindow = VIVANTE_CreateWindow;
|
||||
device->CreateSDLWindow = VIVANTE_CreateWindow;
|
||||
device->SetWindowTitle = VIVANTE_SetWindowTitle;
|
||||
device->SetWindowPosition = VIVANTE_SetWindowPosition;
|
||||
device->SetWindowSize = VIVANTE_SetWindowSize;
|
||||
|
|
|
@ -168,7 +168,7 @@ Wayland_CreateDevice(int devindex)
|
|||
device->GL_GetProcAddress = Wayland_GLES_GetProcAddress;
|
||||
device->GL_DeleteContext = Wayland_GLES_DeleteContext;
|
||||
|
||||
device->CreateWindow = Wayland_CreateWindow;
|
||||
device->CreateSDLWindow = Wayland_CreateWindow;
|
||||
device->ShowWindow = Wayland_ShowWindow;
|
||||
device->SetWindowFullscreen = Wayland_SetWindowFullscreen;
|
||||
device->MaximizeWindow = Wayland_MaximizeWindow;
|
||||
|
|
|
@ -137,9 +137,8 @@ WIN_CreateDevice(int devindex)
|
|||
device->SetDisplayMode = WIN_SetDisplayMode;
|
||||
device->PumpEvents = WIN_PumpEvents;
|
||||
|
||||
#undef CreateWindow
|
||||
device->CreateWindow = WIN_CreateWindow;
|
||||
device->CreateWindowFrom = WIN_CreateWindowFrom;
|
||||
device->CreateSDLWindow = WIN_CreateWindow;
|
||||
device->CreateSDLWindowFrom = WIN_CreateWindowFrom;
|
||||
device->SetWindowTitle = WIN_SetWindowTitle;
|
||||
device->SetWindowIcon = WIN_SetWindowIcon;
|
||||
device->SetWindowPosition = WIN_SetWindowPosition;
|
||||
|
|
|
@ -140,7 +140,7 @@ WINRT_CreateDevice(int devindex)
|
|||
/* Set the function pointers */
|
||||
device->VideoInit = WINRT_VideoInit;
|
||||
device->VideoQuit = WINRT_VideoQuit;
|
||||
device->CreateWindow = WINRT_CreateWindow;
|
||||
device->CreateSDLWindow = WINRT_CreateWindow;
|
||||
device->SetWindowSize = WINRT_SetWindowSize;
|
||||
device->SetWindowFullscreen = WINRT_SetWindowFullscreen;
|
||||
device->DestroyWindow = WINRT_DestroyWindow;
|
||||
|
|
|
@ -231,8 +231,8 @@ X11_CreateDevice(int devindex)
|
|||
device->SuspendScreenSaver = X11_SuspendScreenSaver;
|
||||
device->PumpEvents = X11_PumpEvents;
|
||||
|
||||
device->CreateWindow = X11_CreateWindow;
|
||||
device->CreateWindowFrom = X11_CreateWindowFrom;
|
||||
device->CreateSDLWindow = X11_CreateWindow;
|
||||
device->CreateSDLWindowFrom = X11_CreateWindowFrom;
|
||||
device->SetWindowTitle = X11_SetWindowTitle;
|
||||
device->SetWindowIcon = X11_SetWindowIcon;
|
||||
device->SetWindowPosition = X11_SetWindowPosition;
|
||||
|
|
Loading…
Reference in New Issue