We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3686

Summary: [patch] QNX 7.0 support
Product: SDL Reporter: Elad Lahav <e2lahav>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus, programmerjake
Version: 2.0.5   
Hardware: All   
OS: QNX   
Attachments: SDL2 QNX support

Description Elad Lahav 2017-06-28 11:23:17 UTC
Created attachment 2782 [details]
SDL2 QNX support

The attached diff file implements a video back-end for QNX systems using the Screen compositing window manager. It also fixes a small, but critical, bug in the QSA audio plugin.
The patch was tested on 7.0 x86_64 machines, though it should work on other architectures and, probably, on QNX 6.6 as well. Tested games include uMario (https://github.com/jakowskidev/uMario_Jakowski1) and Pacman (https://github.com/ebuc99/pacman).

The code builds on QNX machines using the standard steps:

# ./autogen.sh
# ./configure
# make

Or on Linux machines with cross-platform compilation:

# ./autogen.sh
# ./configure --build=x86_64-pc-linux-gnu --host x86_64-pc-nto-qnx7.0.0 --prefix=$PWD/dist --disable-pulseaudio
# make
Comment 1 Ryan C. Gordon 2017-06-28 18:03:34 UTC
How hard is it to get a QNX build environment going? I'd like to add this to the buildbot, so QNX continues to get build coverage on each commit. Are the development tools available for free somewhere?

--ryan.
Comment 2 Ryan C. Gordon 2017-07-01 05:45:53 UTC
This patch looks good; I'm going to push it in the morning if no one beats me to it.

--ryan.
Comment 3 Ryan C. Gordon 2017-07-01 21:51:11 UTC
This patch is now https://hg.libsdl.org/SDL/rev/28d3a50e276e, thanks!

--ryan.
Comment 4 programmerjake 2017-07-01 23:10:23 UTC
the patch has a bug on line 110 of /src/video/qnx/keyboard.c: if val == sizeof(key_to_sdl) / sizeof(int), then it will read one past the end of key_to_sdl.
Comment 5 Ryan C. Gordon 2017-07-01 23:52:41 UTC
(In reply to programmerjake from comment #4)
> the patch has a bug on line 110 of /src/video/qnx/keyboard.c: if val ==
> sizeof(key_to_sdl) / sizeof(int), then it will read one past the end of
> key_to_sdl.

This is now fixed in https://hg.libsdl.org/SDL/rev/e1fc7d3b46fb, thanks!

--ryan.