Skip to content

Tracking new features in new SDL versions (2672) #1381

Open
@GalacticEmperor1

Description

@GalacticEmperor1

Issue №2672 opened by illume at 2021-08-14 10:16:12

SDL 2.0.16 released

Update our wheel builds:

  • windows appveyor
  • windows github
  • mac
  • manylinux

This issue also tracks progress on adding support for new APIs/features:

  • Added SDL_FlashWindow() to get a user’s attention
  • Added SDL_GetAudioDeviceSpec() to get the preferred audio format of a device
  • Added SDL_SetWindowAlwaysOnTop() to dynamically change the SDL_WINDOW_ALWAYS_ON_TOP flag for a window
  • Added SDL_SetWindowKeyboardGrab() to support grabbing the keyboard independently of the mouse
  • Added SDL_SoftStretchLinear() to do bilinear scaling between 32-bit software surfaces
  • Added SDL_UpdateNVTexture() to update streaming NV12/21 textures
  • Added SDL_GameControllerSendEffect() and SDL_JoystickSendEffect() to allow sending custom trigger effects to the DualSense controller
  • Added SDL_GameControllerGetSensorDataRate() to get the sensor data rate for PlayStation and Nintendo Switch controllers
  • Added SDL_GameControllerType constants for the Amazon Luna and Google Stadia controllers

SDL 2.0.18 released

Update our wheel builds:

  • windows
  • mac+manylinux

Some new API in SDL 2.0.18

  • Added SDL_RenderGeometry() and SDL_RenderGeometryRaw() to allow rendering of arbitrary shapes using the SDL 2D render API
  • Added SDL_SetTextureUserData() and SDL_GetTextureUserData() to associate application data with an SDL texture
  • Added SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() to convert between window coordinates and logical render coordinates
  • Added SDL_RenderSetVSync() to change whether a renderer present is synchronized with vblank at runtime
  • Added SDL_PremultiplyAlpha() to premultiply alpha on a block of SDL_PIXELFORMAT_ARGB8888 pixels
  • Added a window event SDL_WINDOWEVENT_DISPLAY_CHANGED which is sent when a window changes what display it’s centered on
  • Added SDL_GetWindowICCProfile() to query a window’s ICC profile
  • A window event SDL_WINDOWEVENT_ICCPROF_CHANGED that is sent when ICC profilechanges
  • Added SDL_SetWindowMouseRect() and SDL_GetWindowMouseRect() to confine the mouse cursor to an area of a window
  • You can now read precise mouse wheel motion using ‘preciseX’ and ‘preciseY’ event fields
  • Added SDL_GameControllerHasRumble() and SDL_GameControllerHasRumbleTriggers() to query whether a game controller supports rumble
  • Added SDL_JoystickHasRumble() and SDL_JoystickHasRumbleTriggers() to query whether a joystick supports rumble

Comments

# # ankith26 commented at 2021-08-14 10:35:23

oops, that was not intended, my bad


# # robertpfeiffer commented at 2021-08-29 12:07:15

SDL2.0.16 also adds client-side window decorations on wayland. They went above and beyond the call of duty because gnome devs stubbornly refused to implement the API for server-side decorations. I'll have to test this out on Ubuntu. I don't know how this interacts with KDE or sway. Basically, somebody needs to test this on

  • Sway
  • KDE
  • Gnome Shell (new window decorations still don't work?)

and make sure this runs on wayland, and native wayland without X11 only (https://twitter.com/blubberquark/status/1426142972308082691). I also wonder if the wheels use the correct wayland bindings. Last time I looked manylinux did not have wayland headers?

Unrelated to the above, we need to talk to kivy/p4a people about SDL_AndroidShowToast().

Also, pipewire support that came with 2.0.16 is not yet in pygame.camera. The camera and toast stuff are not release blockers. The wayland stuff might be.


# # robertpfeiffer commented at 2021-09-02 16:53:00

There is a regression in SDL2.0.16 (doesn't happen in 2.0.14) that is visible in pygame.examples.aliens on gnome-shell with native wayland (not xwayland!). It looks like the display is only partially updated, but pygame.examples.aliens does not use DirtySprites, and it updates the whole window with pygame.display.flip(). It is not a pygame issue. Can anybody reproduce this?

https://user-images.githubusercontent.com/10253/131884930-20e10fb2-31da-450e-8683-e47c22a00dae.mp4
https://user-images.githubusercontent.com/10253/131884862-3e8343e6-c97e-4283-9f27-5f7515db2574.mp4


# # robertpfeiffer commented at 2021-09-12 07:55:32

I tracked down the other Wayland error in 2.0.16: The autotools (congigure && make && make install) build does not build libdecor support correctly, even when it detects libdecor. The cmake build does. If we fix this, we can switch over to native wayland support on wheels.


# # illume commented at 2021-10-09 08:07:33

Mac has been added. Leaving this open until we address the extra functionality added in 2.0.16 (which could mean deciding to not expose the functionality, or add it to the _sdl2 stuff, or adding it somewhere else).


# # ankith26 commented at 2021-12-01 10:38:49

Gonna extend this issue to keep track of features in new SDL versions so that people have a list to take up stuff from. And if any sub-issue needs more discussion, we can move that out into a new issue easily 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions