src/video/raspberry/SDL_rpimouse.c


Log

Author Commit Date CI Message
Sam Lantinga b8d85c69 2022-11-30T12:51:59 Update for SDL3 coding style (#6717) I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base. In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted. The script I ran for the src directory is added as build-scripts/clang-format-src.sh This fixes: #6592 #6593 #6594 (cherry picked from commit 5750bcb174300011b91d1de20edb288fcca70f8c)
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga cb361896 2020-12-09T07:16:22 Fixed bug 5235 - All internal sources should include SDL_assert.h Ryan C. Gordon We should really stick this in SDL_internal.h or something so it's always available.
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Ozkan Sezer 1e47790c 2019-08-26T18:41:40 RPI_FreeCursor: set global_cursor to NULL to prevent double-free (bug 4769)
Ryan C. Gordon b46c7719 2019-07-02T16:49:35 raspberry: Actually commit the whole patch. :) (Thanks, Joe!) Fixes Bugzilla #4699.
Ryan C. Gordon d2058b45 2019-07-02T10:26:54 raspberry: Fixed missing mouse cursor (thanks, Joe!) "Starting with changeset 12433, the mouse cursor is not displayed on the Raspberry Pi platform, due to a bug in the handling of the new "global_cursor" in RPI_ShowCursor(). Currently, if cursor == global_cursor, the function immediately returns 0. The function should not return here. Instead, if cursor == global_cursor, it shouldn't try to hide the current cursor and update global_cursor = cursor. However, it *should* still continue through the rest of the function." Fixes Bugzilla #4699.
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Sam Lantinga a95291c9 2018-11-27T11:16:04 Fixed the hotspot for cursors on Raspberry Pi
Sam Lantinga aea48357 2018-11-27T10:20:29 Fixed bug changing cursors on Raspberry Pi
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga b7be5bce 2017-12-19T11:17:37 Fixed bug 4000 - SDL2 on raspberry: mouse displayed at 0,0 after SDL_ShowCursor Laurent Merckx I have a problem with the SDL_ShowCursor method on Raspberry. Depending on the context, my application hides or show the mouse cursor with SDL_ShowCursor. But when calling SDL_ShowCursor(true), the cursor is displayed at 0,0 (and not at last position). After debugging sources by myself, it seems that the problem is in SDL_rpimouse.c - RPI_ShowCursor: vc_dispmanx_rect_set( &dst_rect, 0, 0, curdata->w, curdata->h); should be vc_dispmanx_rect_set( &dst_rect, mouse->x, mouse->y, curdata->w, curdata->h); For me, it solves the problem.
Sam Lantinga 47506fe1 2017-12-04T20:37:01 Fixed bug 3974 - Fix SDL_WarpMouseInWindow on both KMSDRM and RaspberryPi drivers Manuel Alfayate Corchete This patch fixes SDL_WarpMouseInWindow() in both the KMSDRM and Raspberry Pi graphic backends.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga 012217f0 2016-10-18T23:24:49 Fixed bug 3369 - RaspberryPI ability to specify a Dispmanx layer Albert Casals On a RaspberryPI, it might become convenient to specify the Dispmanx layer SDL uses. Currently, it is hardcoded to be 10000 to sit above most applications. This can be specially useful when integrating other graphical apps and frameworks like OMXplayer, QT5 etc.. in order to have more flexibility on their Z-order.
Sam Lantinga f94bd057 2016-10-13T04:53:01 Fixed bug 3451 - Raspberry Pi Raspbian SDL_assert triggered sometimes at RPI_WarpMouseGlobal Eric wing Sometimes an SDL_assert triggers at RPI_WarpMouseGlobal src/video/raspberry/SDL_rpimouse.c:232 'update'. It doesn't always reproduce, but it seems to happen when you really bog down the system and the event loop can't update for awhile. The first time I hit this, I wasn't even using the mouse. I don't call any warp mouse functions either. I can usually reproduce with a simple program that runs an expensive blocking CPU series of functions which blocks the main loop until complete (can be up to 10 seconds). Sometimes this assertion gets triggered after that. I'm not sure if they are related or coincidental. Disabling the SDL_asserts when compiling SDL will avoid this problem. I actually haven't seen any problems with the mouse when I do this. On a Raspberry Pi 2 running Raspbian Jessie.
Sam Lantinga da6197c5 2016-10-01T13:59:59 Fixed 3149 - Mouse Pointer Raspberry Pi corrupt when moving over screen edges Patrick Gutlich The mouse cursor gets corrupted when the mouse moves over the screen edges (right and bottom) a weird type of scaling seems to occur and you end up with a blank square.
Philipp Wiesemann 05b6ca3c 2016-03-03T20:12:51 Raspberry: Fixed crash if memory allocation for cursor failed.
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Ryan C. Gordon 9d3d6437 2015-07-18T00:03:34 Patched to compile on Raspberry Pi.
Ryan C. Gordon e346f142 2015-07-17T21:03:58 SDL_WarpMouseGlobal() should return non-void. There are platforms it isn't implemented on (and currently can't be implemented on!), and there's currently no way for an app to know this. This shouldn't break ABI on apps that moved to a revision between 2.0.3 and 2.0.4.
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
Sam Lantinga 45ed5ee4 2014-06-04T10:55:26 Added an API function to warp the mouse cursor in global screen space: SDL_WarpMouseGlobal()
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Gabriel Jacobo f848adff 2013-11-29T10:06:08 Improve Android pause/resume behavior.
Ryan C. Gordon 7e1289af 2013-11-24T23:56:17 Make internal SDL sources include SDL_internal.h instead of SDL_config.h The new header will include SDL_config.h, but allows for other global stuff.
Gabriel Jacobo 9ceed73d 2013-09-28T13:28:19 Raspberry Pi support (also unified UDEV and EVDEV support)