Commit Graph

20 Commits

Author SHA1 Message Date
Sam Lantinga
222d25ad4b Fixed bug 3805 - Why is there no --enable-video-rpi option in configure?
Andreas Falkenhahn

When compiling SDL for the Raspberry Pi, I have to use the --host parameter to enable compilation of the native Raspberry Pi video driver, like so:

    --host=arm-raspberry-linux-gnueabihf

It took me a while to figure out that this was necessary in order to have the native Raspberry Pi video driver compiled in. I think it would be better if there was an option like --enable-video-rpi that could be passed to configure and that would also show up when saying configure --help. Currently, it?s rather difficult to figure out that you have to use the --host parameter with arm-raspberry-linux-gnueabihf in order to get Raspberry Pi video support. It?s also somewhat inconsistent because most other video drivers can in fact be enabled/disabled through specific configure parameters but there is no such parameter for the native Raspberry Pi video driver.
2017-09-08 22:21:01 -07:00
Ryan C. Gordon
167398b363 video: Let video targets optionally decide their default OpenGL configs.
This is necessary because the Raspberry Pi is a strange beast, that believes
it has OpenGL support (through glX?) but generally has GLES2 support.

So when using the raspberry video target, we need to force this to default
to a GLES2 context, or by default SDL_CreateWindow() will fail, deep down
when it tries to load the proper GL library.

Fixes testsprite2 (and basically everything else that wasn't testgles2) when
run on a Raspberry Pi without a X server.

Please note that other targets might also need this filled in, the Raspberry
Pi is just the most prominent and readily-available System-On-A-Chip style
thing on my desk.  :)
2017-09-02 19:35:32 -04:00
Sam Lantinga
50efbda736 Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
Sam Lantinga
0d011ec66d Renaming of guard header names to quiet -Wreserved-id-macro 2017-08-28 00:22:23 -07:00
Sam Lantinga
56363ebf61 Fixed bug 3690 - SDL2 KMS/DRM render context support
Manuel

The attached patch adds support for KMS/DRM context graphics.

It builds with no problem on X86_64 GNU/Linux systems, provided the needed libraries are present, and on ARM GNU/Linux systems that have KMS/DRM support and a GLES2 implementation.
Tested on Raspberry Pi: KMS/DRM is what the Raspberry Pi will use as default in the near future, once the propietary DispmanX API by Broadcom is overtaken by open graphics stack, it's possible to boot current Raspbian system in KMS mode by adding "dtoverlay=vc4-kms-v3d" to config.txt on Raspbian's boot partition.
X86 systems use KMS right away in every current GNU/Linux system.

Simple build instructions:

$./autogen.sh
$./configure --enable-video-kmsdrm
$make
2017-08-02 10:22:48 -07:00
Philipp Wiesemann
60c0f7e243 Fixed SDL_GetWindowWMInfo() returning success on three unsupported platforms. 2017-06-15 23:30:29 +02:00
Philipp Wiesemann
266816b4aa Removed newlines from error messages. 2017-03-26 21:00:19 +02:00
Ryan C. Gordon
bc8778854e raspberrypi: RPI_Destroy() should free the SDL_VideoDevice and its driverdata. 2017-02-28 19:48:52 -05:00
Sam Lantinga
c16dd74f3b Check the return value of SDL_EVDEV_Init() 2017-01-08 18:32:20 -08:00
Sam Lantinga
45b774e3f7 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
97d05b0da8 Fixed a bunch of SwapWindow calls that needed their return value updated 2016-12-09 05:12:27 -08:00
Sam Lantinga
012217f069 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.
2016-10-18 23:24:49 -07:00
Sam Lantinga
f94bd05736 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.
2016-10-13 04:53:01 -07:00
Sam Lantinga
da6197c5a8 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.
2016-10-01 13:59:59 -07:00
Philipp Wiesemann
d478f26ef4 Updated comments in video implementations. 2016-07-18 22:03:47 +02:00
Philipp Wiesemann
05b6ca3c35 Raspberry: Fixed crash if memory allocation for cursor failed. 2016-03-03 20:12:51 +01:00
Sam Lantinga
42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Ryan C. Gordon
9d3d643742 Patched to compile on Raspberry Pi. 2015-07-18 00:03:34 -04:00
Ryan C. Gordon
e346f14277 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.
2015-07-17 21:03:58 -04:00
Philipp Wiesemann
0e45984fa0 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().
2015-06-21 17:33:46 +02:00