mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
sdl 2.0.8 update
This commit is contained in:
parent
d6f6bc65a5
commit
ec8f56b3b0
894 changed files with 66879 additions and 43299 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -105,7 +105,7 @@ WINRT_XAMLThreadMain(void * userdata)
|
|||
}
|
||||
|
||||
void
|
||||
WINRT_CycleXAMLThread()
|
||||
WINRT_CycleXAMLThread(void)
|
||||
{
|
||||
switch (_threadState) {
|
||||
case ThreadState_NotLaunched:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -75,7 +75,7 @@ extern SDL_bool WINRT_IsScreenKeyboardShown(_THIS, SDL_Window *window);
|
|||
#endif // NTDDI_VERSION >= ...
|
||||
|
||||
/* XAML Thread Management */
|
||||
extern void WINRT_CycleXAMLThread();
|
||||
extern void WINRT_CycleXAMLThread(void);
|
||||
|
||||
#endif // ifdef __cplusplus_winrt
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifndef _SDL_winrtgamebar_h
|
||||
#define _SDL_winrtgamebar_h
|
||||
#ifndef SDL_winrtgamebar_h_
|
||||
#define SDL_winrtgamebar_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
/* These are exported as C++ functions, rather than C, to fix a compilation
|
||||
|
|
@ -30,6 +30,6 @@ extern void WINRT_InitGameBar(_THIS);
|
|||
extern void WINRT_QuitGameBar(_THIS);
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_winrtmouse_h */
|
||||
#endif /* SDL_winrtgamebar_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
/* SDL-specific includes */
|
||||
#include <SDL.h>
|
||||
#include "SDL.h"
|
||||
#include "SDL_winrtevents_c.h"
|
||||
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifndef _SDL_winrtmouse_h
|
||||
#define _SDL_winrtmouse_h
|
||||
#ifndef SDL_winrtmouse_h_
|
||||
#define SDL_winrtmouse_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -35,6 +35,6 @@ extern SDL_bool WINRT_UsingRelativeMouseMode;
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_winrtmouse_h */
|
||||
#endif /* SDL_winrtmouse_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
extern "C" {
|
||||
#include "SDL_winrtopengles.h"
|
||||
#include "SDL_loadso.h"
|
||||
#include "../SDL_egl_c.h"
|
||||
}
|
||||
|
||||
/* Windows includes */
|
||||
|
|
@ -57,7 +58,7 @@ WINRT_GLES_LoadLibrary(_THIS, const char *path)
|
|||
{
|
||||
SDL_VideoData *video_data = (SDL_VideoData *)_this->driverdata;
|
||||
|
||||
if (SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY) != 0) {
|
||||
if (SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -87,11 +88,11 @@ WINRT_GLES_LoadLibrary(_THIS, const char *path)
|
|||
Microsoft::WRL::ComPtr<IUnknown> cpp_display = video_data->winrtEglWindow;
|
||||
_this->egl_data->egl_display = ((eglGetDisplay_Old_Function)_this->egl_data->eglGetDisplay)(cpp_display);
|
||||
if (!_this->egl_data->egl_display) {
|
||||
return SDL_SetError("Could not get Windows 8.0 EGL display");
|
||||
return SDL_EGL_SetError("Could not get Windows 8.0 EGL display", "eglGetDisplay");
|
||||
}
|
||||
|
||||
if (_this->egl_data->eglInitialize(_this->egl_data->egl_display, NULL, NULL) != EGL_TRUE) {
|
||||
return SDL_SetError("Could not initialize Windows 8.0 EGL");
|
||||
return SDL_EGL_SetError("Could not initialize Windows 8.0 EGL", "eglInitialize");
|
||||
}
|
||||
} else {
|
||||
/* Declare some ANGLE/EGL initialization property-sets, as suggested by
|
||||
|
|
@ -132,7 +133,7 @@ WINRT_GLES_LoadLibrary(_THIS, const char *path)
|
|||
*/
|
||||
eglGetPlatformDisplayEXT_Function eglGetPlatformDisplayEXT = (eglGetPlatformDisplayEXT_Function)_this->egl_data->eglGetProcAddress("eglGetPlatformDisplayEXT");
|
||||
if (!eglGetPlatformDisplayEXT) {
|
||||
return SDL_SetError("Could not retrieve ANGLE/WinRT display function(s)");
|
||||
return SDL_EGL_SetError("Could not retrieve ANGLE/WinRT display function(s)", "eglGetProcAddress");
|
||||
}
|
||||
|
||||
#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
|
||||
|
|
@ -141,7 +142,7 @@ WINRT_GLES_LoadLibrary(_THIS, const char *path)
|
|||
*/
|
||||
_this->egl_data->egl_display = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, defaultDisplayAttributes);
|
||||
if (!_this->egl_data->egl_display) {
|
||||
return SDL_SetError("Could not get 10_0+ EGL display");
|
||||
return SDL_EGL_SetError("Could not get EGL display for Direct3D 10_0+", "eglGetPlatformDisplayEXT");
|
||||
}
|
||||
|
||||
if (_this->egl_data->eglInitialize(_this->egl_data->egl_display, NULL, NULL) != EGL_TRUE)
|
||||
|
|
@ -153,7 +154,7 @@ WINRT_GLES_LoadLibrary(_THIS, const char *path)
|
|||
*/
|
||||
_this->egl_data->egl_display = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, fl9_3DisplayAttributes);
|
||||
if (!_this->egl_data->egl_display) {
|
||||
return SDL_SetError("Could not get 9_3 EGL display");
|
||||
return SDL_EGL_SetError("Could not get EGL display for Direct3D 9_3", "eglGetPlatformDisplayEXT");
|
||||
}
|
||||
|
||||
if (_this->egl_data->eglInitialize(_this->egl_data->egl_display, NULL, NULL) != EGL_TRUE) {
|
||||
|
|
@ -162,11 +163,11 @@ WINRT_GLES_LoadLibrary(_THIS, const char *path)
|
|||
*/
|
||||
_this->egl_data->egl_display = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, warpDisplayAttributes);
|
||||
if (!_this->egl_data->egl_display) {
|
||||
return SDL_SetError("Could not get WARP EGL display");
|
||||
return SDL_EGL_SetError("Could not get EGL display for Direct3D WARP", "eglGetPlatformDisplayEXT");
|
||||
}
|
||||
|
||||
if (_this->egl_data->eglInitialize(_this->egl_data->egl_display, NULL, NULL) != EGL_TRUE) {
|
||||
return SDL_SetError("Could not initialize WinRT 8.x+ EGL");
|
||||
return SDL_EGL_SetError("Could not initialize WinRT 8.x+ EGL", "eglInitialize");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifndef _SDL_winrtopengles_h
|
||||
#define _SDL_winrtopengles_h
|
||||
#ifndef SDL_winrtopengles_h_
|
||||
#define SDL_winrtopengles_h_
|
||||
|
||||
#if SDL_VIDEO_DRIVER_WINRT && SDL_VIDEO_OPENGL_EGL
|
||||
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
extern int WINRT_GLES_LoadLibrary(_THIS, const char *path);
|
||||
extern void WINRT_GLES_UnloadLibrary(_THIS);
|
||||
extern SDL_GLContext WINRT_GLES_CreateContext(_THIS, SDL_Window * window);
|
||||
extern void WINRT_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int WINRT_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int WINRT_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
|
||||
|
||||
|
|
@ -65,6 +65,6 @@ typedef EGLDisplay (EGLAPIENTRY *eglGetPlatformDisplayEXT_Function)(EGLenum, voi
|
|||
|
||||
#endif /* SDL_VIDEO_DRIVER_WINRT && SDL_VIDEO_OPENGL_EGL */
|
||||
|
||||
#endif /* _SDL_winrtopengles_h */
|
||||
#endif /* SDL_winrtopengles_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -295,7 +295,7 @@ void WINRT_ProcessPointerReleasedEvent(SDL_Window *window, Windows::UI::Input::P
|
|||
}
|
||||
WINRT_LeftFingerDown = 0;
|
||||
}
|
||||
|
||||
|
||||
SDL_SendTouch(
|
||||
WINRT_TouchID,
|
||||
(SDL_FingerID) pointerPoint->PointerId,
|
||||
|
|
@ -335,9 +335,8 @@ WINRT_ProcessPointerWheelChangedEvent(SDL_Window *window, Windows::UI::Input::Po
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME: This may need to accumulate deltas up to WHEEL_DELTA
|
||||
short motion = pointerPoint->Properties->MouseWheelDelta / WHEEL_DELTA;
|
||||
SDL_SendMouseWheel(window, 0, 0, motion, SDL_MOUSEWHEEL_NORMAL);
|
||||
float motion = (float) pointerPoint->Properties->MouseWheelDelta / WHEEL_DELTA;
|
||||
SDL_SendMouseWheel(window, 0, 0, (float) motion, SDL_MOUSEWHEEL_NORMAL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -369,7 +368,7 @@ WINRT_ProcessMouseMovedEvent(SDL_Window * window, Windows::Devices::Input::Mouse
|
|||
// http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.input.mouseeventargs.mousedelta ),
|
||||
// does not seem to indicate (to me) that its values should be so large. It
|
||||
// says that its values should be a "change in screen location". I could
|
||||
// be misinterpreting this, however a post on MSDN from a Microsoft engineer (see:
|
||||
// be misinterpreting this, however a post on MSDN from a Microsoft engineer (see:
|
||||
// http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/09a9868e-95bb-4858-ba1a-cb4d2c298d62 ),
|
||||
// indicates that these values are in DIPs, which is the same unit used
|
||||
// by CoreWindow's PointerMoved events (via the Position field in its CurrentPoint
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -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;
|
||||
|
|
@ -621,7 +621,7 @@ WINRT_CreateWindow(_THIS, SDL_Window * window)
|
|||
_this->egl_data->egl_config,
|
||||
cpp_winrtEglWindow, NULL);
|
||||
if (data->egl_surface == NULL) {
|
||||
return SDL_SetError("eglCreateWindowSurface failed");
|
||||
return SDL_EGL_SetError("unable to create EGL native-window surface", "eglCreateWindowSurface");
|
||||
}
|
||||
} else if (data->coreWindow.Get() != nullptr) {
|
||||
/* Attempt to create a window surface using newer versions of
|
||||
|
|
@ -634,7 +634,7 @@ WINRT_CreateWindow(_THIS, SDL_Window * window)
|
|||
coreWindowAsIInspectable,
|
||||
NULL);
|
||||
if (data->egl_surface == NULL) {
|
||||
return SDL_SetError("eglCreateWindowSurface failed");
|
||||
return SDL_EGL_SetError("unable to create EGL native-window surface", "eglCreateWindowSurface");
|
||||
}
|
||||
} else {
|
||||
return SDL_SetError("No supported means to create an EGL window surface are available");
|
||||
|
|
@ -771,7 +771,7 @@ WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
|||
info->info.winrt.window = reinterpret_cast<IInspectable *>(data->coreWindow.Get());
|
||||
return SDL_TRUE;
|
||||
} else {
|
||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
||||
SDL_SetError("Application not compiled with SDL %d.%d",
|
||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue