Revert "Updated SDL, Bullet and OpenAL soft libs"

This reverts commit 370161cfb1.
This commit is contained in:
AzaezelX 2019-07-08 09:49:44 -05:00
parent 63be684474
commit bc77ff0833
1102 changed files with 62741 additions and 204988 deletions

View file

@ -1,60 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_internal.h"
/* Display event handling code for SDL */
#include "SDL_events.h"
#include "SDL_events_c.h"
int
SDL_SendDisplayEvent(SDL_VideoDisplay *display, Uint8 displayevent, int data1)
{
int posted;
if (!display) {
return 0;
}
switch (displayevent) {
case SDL_DISPLAYEVENT_ORIENTATION:
if (data1 == SDL_ORIENTATION_UNKNOWN || data1 == display->orientation) {
return 0;
}
display->orientation = (SDL_DisplayOrientation)data1;
break;
}
/* Post the event, if desired */
posted = 0;
if (SDL_GetEventState(SDL_DISPLAYEVENT) == SDL_ENABLE) {
SDL_Event event;
event.type = SDL_DISPLAYEVENT;
event.display.event = displayevent;
event.display.display = SDL_GetIndexOfDisplay(display);
event.display.data1 = data1;
posted = (SDL_PushEvent(&event) > 0);
}
return (posted);
}
/* vi: set ts=4 sw=4 expandtab: */

View file

@ -1,30 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_internal.h"
#ifndef SDL_displayevents_c_h_
#define SDL_displayevents_c_h_
extern int SDL_SendDisplayEvent(SDL_VideoDisplay *display, Uint8 displayevent, int data1);
#endif /* SDL_displayevents_c_h_ */
/* vi: set ts=4 sw=4 expandtab: */

View file

@ -417,10 +417,6 @@ SDL_StartEventLoop(void)
SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE);
#if 0 /* Leave these events enabled so apps can respond to items being dragged onto them at startup */
SDL_EventState(SDL_DROPFILE, SDL_DISABLE);
SDL_EventState(SDL_DROPTEXT, SDL_DISABLE);
#endif
SDL_AtomicSet(&SDL_EventQ.active, 1);
@ -608,10 +604,6 @@ SDL_FlushEvent(Uint32 type)
void
SDL_FlushEvents(Uint32 minType, Uint32 maxType)
{
/* !!! FIXME: we need to manually SDL_free() the strings in TEXTINPUT and
drag'n'drop events if we're flushing them without passing them to the
app, but I don't know if this is the right place to do that. */
/* Don't look after we've quit */
if (!SDL_AtomicGet(&SDL_EventQ.active)) {
return;
@ -659,13 +651,6 @@ SDL_PumpEvents(void)
}
#endif
#if !SDL_SENSOR_DISABLED
/* Check for sensor state change */
if (!SDL_disabled_events[SDL_SENSORUPDATE >> 8]) {
SDL_SensorUpdate();
}
#endif
SDL_SendPendingQuit(); /* in case we had a signal handler fire, etc. */
}
@ -878,8 +863,6 @@ SDL_FilterEvents(SDL_EventFilter filter, void *userdata)
Uint8
SDL_EventState(Uint32 type, int state)
{
const SDL_bool isdnd = ((state == SDL_DISABLE) || (state == SDL_ENABLE)) &&
((type == SDL_DROPFILE) || (type == SDL_DROPTEXT));
Uint8 current_state;
Uint8 hi = ((type >> 8) & 0xff);
Uint8 lo = (type & 0xff);
@ -915,12 +898,6 @@ SDL_EventState(Uint32 type, int state)
}
}
/* turn off drag'n'drop support if we've disabled the events.
This might change some UI details at the OS level. */
if (isdnd) {
SDL_ToggleDragAndDropSupport();
}
return current_state;
}

View file

@ -18,19 +18,12 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_events_c_h_
#define SDL_events_c_h_
#include "../SDL_internal.h"
/* Useful functions and variables from SDL_events.c */
#include "SDL_events.h"
#include "SDL_thread.h"
#include "../video/SDL_sysvideo.h"
#include "SDL_clipboardevents_c.h"
#include "SDL_displayevents_c.h"
#include "SDL_dropevents_c.h"
#include "SDL_gesture_c.h"
#include "SDL_keyboard_c.h"
@ -53,6 +46,4 @@ extern void SDL_QuitQuit(void);
extern void SDL_SendPendingQuit(void);
#endif /* SDL_events_c_h_ */
/* vi: set ts=4 sw=4 expandtab: */

View file

@ -33,38 +33,12 @@
/* The mouse state */
static SDL_Mouse SDL_mouse;
static Uint32 SDL_double_click_time = 500;
static int SDL_double_click_radius = 1;
static int
SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y);
static void SDLCALL
SDL_MouseDoubleClickTimeChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
{
SDL_Mouse *mouse = (SDL_Mouse *)userdata;
if (hint && *hint) {
mouse->double_click_time = SDL_atoi(hint);
} else {
#ifdef __WIN32__
mouse->double_click_time = GetDoubleClickTime();
#else
mouse->double_click_time = 500;
#endif
}
}
static void SDLCALL
SDL_MouseDoubleClickRadiusChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
{
SDL_Mouse *mouse = (SDL_Mouse *)userdata;
if (hint && *hint) {
mouse->double_click_radius = SDL_atoi(hint);
} else {
mouse->double_click_radius = 32; /* 32 pixels seems about right for touch interfaces */
}
}
static void SDLCALL
SDL_MouseNormalSpeedScaleChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
{
@ -109,12 +83,6 @@ SDL_MouseInit(void)
SDL_zerop(mouse);
SDL_AddHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_TIME,
SDL_MouseDoubleClickTimeChanged, mouse);
SDL_AddHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS,
SDL_MouseDoubleClickRadiusChanged, mouse);
SDL_AddHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE,
SDL_MouseNormalSpeedScaleChanged, mouse);
@ -146,6 +114,12 @@ SDL_GetMouse(void)
return &SDL_mouse;
}
void
SDL_SetDoubleClickTime(Uint32 interval)
{
SDL_double_click_time = interval;
}
SDL_Window *
SDL_GetMouseFocus(void)
{
@ -480,9 +454,9 @@ SDL_PrivateSendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state
if (state == SDL_PRESSED) {
Uint32 now = SDL_GetTicks();
if (SDL_TICKS_PASSED(now, clickstate->last_timestamp + mouse->double_click_time) ||
SDL_abs(mouse->x - clickstate->last_x) > mouse->double_click_radius ||
SDL_abs(mouse->y - clickstate->last_y) > mouse->double_click_radius) {
if (SDL_TICKS_PASSED(now, clickstate->last_timestamp + SDL_double_click_time) ||
SDL_abs(mouse->x - clickstate->last_x) > SDL_double_click_radius ||
SDL_abs(mouse->y - clickstate->last_y) > SDL_double_click_radius) {
clickstate->click_count = 0;
}
clickstate->last_timestamp = now;
@ -714,7 +688,6 @@ static SDL_bool
ShouldUseRelativeModeWarp(SDL_Mouse *mouse)
{
if (!mouse->SetRelativeMouseMode) {
SDL_assert(mouse->WarpMouse); /* Need this functionality for relative mode warp implementation */
return SDL_TRUE;
}
@ -747,9 +720,6 @@ SDL_SetRelativeMouseMode(SDL_bool enabled)
} else if (mouse->SetRelativeMouseMode(enabled) < 0) {
if (enabled) {
/* Fall back to warp mode if native relative mode failed */
if (!mouse->WarpMouse) {
return SDL_SetError("No relative mode implementation available");
}
mouse->relative_mode_warp = SDL_TRUE;
}
}

View file

@ -90,8 +90,6 @@ typedef struct
float relative_speed_scale;
float scale_accum_x;
float scale_accum_y;
Uint32 double_click_time;
int double_click_radius;
SDL_bool touch_mouse_events;
/* Data for double-click tracking */
@ -114,6 +112,9 @@ extern int SDL_MouseInit(void);
/* Get the mouse state structure */
SDL_Mouse *SDL_GetMouse(void);
/* Set the default double-click interval */
extern void SDL_SetDoubleClickTime(Uint32 interval);
/* Set the default mouse cursor */
extern void SDL_SetDefaultCursor(SDL_Cursor * cursor);

View file

@ -25,16 +25,30 @@
#include "SDL_events.h"
#include "SDL_events_c.h"
#include "SDL_mouse_c.h"
#include "../video/SDL_sysvideo.h"
static int SDLCALL
RemovePendingSizeChangedAndResizedEvents(void * userdata, SDL_Event *event)
RemovePendingResizedEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
if (event->type == SDL_WINDOWEVENT &&
(event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED ||
event->window.event == SDL_WINDOWEVENT_RESIZED) &&
event->window.event == SDL_WINDOWEVENT_RESIZED &&
event->window.windowID == new_event->window.windowID) {
/* We're about to post a new size event, drop the old one */
return 0;
}
return 1;
}
static int SDLCALL
RemovePendingSizeChangedEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
if (event->type == SDL_WINDOWEVENT &&
event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED &&
event->window.windowID == new_event->window.windowID) {
/* We're about to post a new size event, drop the old one */
return 0;
@ -186,8 +200,11 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1,
event.window.windowID = window->id;
/* Fixes queue overflow with resize events that aren't processed */
if (windowevent == SDL_WINDOWEVENT_RESIZED) {
SDL_FilterEvents(RemovePendingResizedEvents, &event);
}
if (windowevent == SDL_WINDOWEVENT_SIZE_CHANGED) {
SDL_FilterEvents(RemovePendingSizeChangedAndResizedEvents, &event);
SDL_FilterEvents(RemovePendingSizeChangedEvents, &event);
}
if (windowevent == SDL_WINDOWEVENT_MOVED) {
SDL_FilterEvents(RemovePendingMoveEvents, &event);

View file

@ -18,10 +18,6 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef scancodes_xfree86_h_
#define scancodes_xfree86_h_
#include "../../include/SDL_scancode.h"
/* XFree86 key code to SDL scancode mapping table
@ -507,6 +503,4 @@ static const SDL_Scancode xvnc_scancode_table[] = {
/* 80 */ SDL_SCANCODE_F12,
};
#endif /* scancodes_xfree86_h_ */
/* *INDENT-ON* */