mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
Compare commits
8 Commits
2.0.22-RC2
...
2.0.22-RC3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
981e1e3c44 | ||
![]() |
7a5743031d | ||
![]() |
fa073ed01a | ||
![]() |
8986efd643 | ||
![]() |
2ca0837888 | ||
![]() |
04bf7c9434 | ||
![]() |
d9b5805ba5 | ||
![]() |
0288de8529 |
@@ -54,11 +54,6 @@ typedef struct SDL_Point
|
|||||||
/**
|
/**
|
||||||
* The structure that defines a point (floating point)
|
* The structure that defines a point (floating point)
|
||||||
*
|
*
|
||||||
* \sa SDL_FRectEmpty
|
|
||||||
* \sa SDL_FRectEquals
|
|
||||||
* \sa SDL_HasIntersectionF
|
|
||||||
* \sa SDL_IntersectFRect
|
|
||||||
* \sa SDL_UnionFRect
|
|
||||||
* \sa SDL_EncloseFPoints
|
* \sa SDL_EncloseFPoints
|
||||||
* \sa SDL_PointInFRect
|
* \sa SDL_PointInFRect
|
||||||
*/
|
*/
|
||||||
@@ -76,6 +71,7 @@ typedef struct SDL_FPoint
|
|||||||
* \sa SDL_RectEquals
|
* \sa SDL_RectEquals
|
||||||
* \sa SDL_HasIntersection
|
* \sa SDL_HasIntersection
|
||||||
* \sa SDL_IntersectRect
|
* \sa SDL_IntersectRect
|
||||||
|
* \sa SDL_IntersectRectAndLine
|
||||||
* \sa SDL_UnionRect
|
* \sa SDL_UnionRect
|
||||||
* \sa SDL_EnclosePoints
|
* \sa SDL_EnclosePoints
|
||||||
*/
|
*/
|
||||||
@@ -88,6 +84,16 @@ typedef struct SDL_Rect
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A rectangle, with the origin at the upper left (floating point).
|
* A rectangle, with the origin at the upper left (floating point).
|
||||||
|
*
|
||||||
|
* \sa SDL_FRectEmpty
|
||||||
|
* \sa SDL_FRectEquals
|
||||||
|
* \sa SDL_FRectEqualsEpsilon
|
||||||
|
* \sa SDL_HasIntersectionF
|
||||||
|
* \sa SDL_IntersectFRect
|
||||||
|
* \sa SDL_IntersectFRectAndLine
|
||||||
|
* \sa SDL_UnionFRect
|
||||||
|
* \sa SDL_EncloseFPoints
|
||||||
|
* \sa SDL_PointInFRect
|
||||||
*/
|
*/
|
||||||
typedef struct SDL_FRect
|
typedef struct SDL_FRect
|
||||||
{
|
{
|
||||||
|
@@ -410,7 +410,6 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ
|
|||||||
mouse->x = x;
|
mouse->x = x;
|
||||||
mouse->y = y;
|
mouse->y = y;
|
||||||
mouse->has_position = SDL_TRUE;
|
mouse->has_position = SDL_TRUE;
|
||||||
return 0;
|
|
||||||
} else if (!xrel && !yrel) { /* Drop events that don't change state */
|
} else if (!xrel && !yrel) { /* Drop events that don't change state */
|
||||||
#ifdef DEBUG_MOUSE
|
#ifdef DEBUG_MOUSE
|
||||||
SDL_Log("Mouse event didn't change state - dropped!\n");
|
SDL_Log("Mouse event didn't change state - dropped!\n");
|
||||||
|
@@ -1497,6 +1497,7 @@ void HID_API_EXPORT hid_close(hid_device *dev)
|
|||||||
|
|
||||||
/* Clean up the Transfer objects allocated in read_thread(). */
|
/* Clean up the Transfer objects allocated in read_thread(). */
|
||||||
free(dev->transfer->buffer);
|
free(dev->transfer->buffer);
|
||||||
|
dev->transfer->buffer = NULL;
|
||||||
libusb_free_transfer(dev->transfer);
|
libusb_free_transfer(dev->transfer);
|
||||||
|
|
||||||
/* release the interface */
|
/* release the interface */
|
||||||
|
@@ -961,7 +961,10 @@ HIDAPI_DriverPS5_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev,
|
|||||||
axis = ((int)packet->ucRightJoystickY * 257) - 32768;
|
axis = ((int)packet->ucRightJoystickY * 257) - 32768;
|
||||||
SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, axis);
|
SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, axis);
|
||||||
|
|
||||||
if (packet->ucBatteryLevel & 0x10) {
|
/* A check of packet->ucBatteryLevel & 0x10 should work as a check for BT vs USB but doesn't
|
||||||
|
* seem to always work. Possibly related to being 100% charged?
|
||||||
|
*/
|
||||||
|
if (!ctx->is_bluetooth) {
|
||||||
/* 0x20 set means fully charged */
|
/* 0x20 set means fully charged */
|
||||||
SDL_PrivateJoystickBatteryLevel(joystick, SDL_JOYSTICK_POWER_WIRED);
|
SDL_PrivateJoystickBatteryLevel(joystick, SDL_JOYSTICK_POWER_WIRED);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -330,6 +330,19 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle
|
|||||||
subtype = 1;
|
subtype = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SDL_strcmp(name, "Backbone One") == 0) {
|
||||||
|
/* The Backbone app uses the guide and share buttons */
|
||||||
|
if ((device->button_mask & (1 << SDL_CONTROLLER_BUTTON_GUIDE)) != 0) {
|
||||||
|
device->button_mask &= ~(1 << SDL_CONTROLLER_BUTTON_GUIDE);
|
||||||
|
--nbuttons;
|
||||||
|
}
|
||||||
|
if ((device->button_mask & (1 << SDL_CONTROLLER_BUTTON_MISC1)) != 0) {
|
||||||
|
device->button_mask &= ~(1 << SDL_CONTROLLER_BUTTON_MISC1);
|
||||||
|
--nbuttons;
|
||||||
|
device->has_xbox_share_button = SDL_FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
device->naxes = 6; /* 2 thumbsticks and 2 triggers */
|
device->naxes = 6; /* 2 thumbsticks and 2 triggers */
|
||||||
device->nhats = 1; /* d-pad */
|
device->nhats = 1; /* d-pad */
|
||||||
device->nbuttons = nbuttons;
|
device->nbuttons = nbuttons;
|
||||||
|
@@ -1322,8 +1322,10 @@ RAWINPUT_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint
|
|||||||
if (!SUCCEEDED(hr)) {
|
if (!SUCCEEDED(hr)) {
|
||||||
return SDL_SetError("Setting vibration failed: 0x%lx\n", hr);
|
return SDL_SetError("Setting vibration failed: 0x%lx\n", hr);
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return SDL_SetError("Controller isn't correlated yet, try hitting a button first");
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
#else
|
#else
|
||||||
return SDL_Unsupported();
|
return SDL_Unsupported();
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1230,6 +1230,13 @@ GL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __MACOSX__
|
||||||
|
// On macOS on older systems, the OpenGL view change and resize events aren't
|
||||||
|
// necessarily synchronized, so just always reset it.
|
||||||
|
// Workaround for: https://discourse.libsdl.org/t/sdl-2-0-22-prerelease/35306/6
|
||||||
|
data->drawstate.viewport_dirty = SDL_TRUE;
|
||||||
|
#endif
|
||||||
|
|
||||||
while (cmd) {
|
while (cmd) {
|
||||||
switch (cmd->command) {
|
switch (cmd->command) {
|
||||||
case SDL_RENDERCMD_SETDRAWCOLOR: {
|
case SDL_RENDERCMD_SETDRAWCOLOR: {
|
||||||
|
Reference in New Issue
Block a user