• Show log

    Commit

  • Hash : 1fb4429b
    Author : David Gow
    Date : 2021-07-28T21:50:48

    wayland: Avoid a pointer→TouchID cast warning
    
    As of [1], SDL now compiles with a warning in SDL_waylandevents.c on
    32-bit systems under gcc 10.3.0:
    
    /tmp/SDL/src/video/wayland/SDL_waylandevents.c: In function 'seat_handle_capabilities':
    /tmp/SDL/src/video/wayland/SDL_waylandevents.c:958:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      958 |         SDL_AddTouch((SDL_TouchID)seat, SDL_TOUCH_DEVICE_DIRECT, "wayland_touch");
          |                      ^
    /tmp/SDL/src/video/wayland/SDL_waylandevents.c:964:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      964 |         SDL_DelTouch((SDL_TouchID)seat);
          |                      ^
    
    This is due to SDL_TouchID always being 32-bit, but seat being a pointer
    which is (obviously) only 32-bit on 32-bit systems. The conversion is
    therefore harmless, so silence it with an extra cast via intptr_t.
    
    This is what the cocoa backend does (and is similar to what the Win32
    backend does, except with size_t).
    
    Fixes: 03c19efbd1 ("Added support for multiple seats with touch input on Wayland")
    
    [1]: https://github.com/libsdl-org/SDL/commit/03c19efbd17f72f70ee021de6d2549eb0be3bb56
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/SDL.git
    Git SSH git@git.kmx.io:kc3-lang/SDL.git
    Public access ? public
    Description

    Fork of https://github.com/libsdl-org/SDL

    Users
    thodg_w kc3_lang_org thodg_l thodg_m www_kmx_io thodg
    Tags

  • README.md

  • Simple DirectMedia Layer (SDL) Version 2.0

    https://www.libsdl.org/

    Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve’s award winning catalog and many Humble Bundle games.

    More extensive documentation is available in the docs directory, starting with README.md

    Enjoy!

    Sam Lantinga (slouken@libsdl.org)