You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 2.0.9 Reported for operating system, platform: Android (All), ARM
Comments on the original bug report:
On 2019-04-19 01:43:36 +0000, Steve Robinson wrote:
Created attachment 3753
Error screen shot
Build SDL 2.0.9 with CMake for Android
Build the 'Rectangles' example included in SDL2 source
Run the APK
I get an 'SDL HIDAPI Error' when running the apk (see the attached screen shot).
Upon further investigation, it's clear that the newly-added hidapi functionality was not added to the CMake build system included with SDL2. The android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java file used in the 'Rectangles' example is trying to load a hidapi shared library that doesn't exist.
So for users of CMake, SDL2 for Android is completely unusable and all other platforms do not include the new hidapi functionality.
On 2019-04-19 01:44:51 +0000, Steve Robinson wrote:
Created attachment 3754
Error screen shot
On 2019-04-19 01:46:47 +0000, Steve Robinson wrote:
Created attachment 3755
Error screen shot
On 2019-04-19 01:52:29 +0000, Steve Robinson wrote:
Created attachment 3756
CMakeLists-hidapi.txt
On 2019-04-19 01:53:08 +0000, Steve Robinson wrote:
Created attachment 3757
CMakeLists.diff
On 2019-04-19 01:53:45 +0000, Steve Robinson wrote:
Created attachment 3758
HIDDeviceManager.diff
On 2019-04-19 01:54:17 +0000, Steve Robinson wrote:
Created attachment 3759
SDL_config.h.diff
On 2019-04-19 01:54:42 +0000, Steve Robinson wrote:
Created attachment 3760
SDL_config_iphoneos.diff
On 2019-04-19 02:00:32 +0000, Steve Robinson wrote:
CMakeLists-hidapi.txt
Rename this file to CMakeLists.txt and put it in src/hidapi. It defines the hidapi static library. For linux, I chose the hidraw hid back-end instead of libusb since it supports USB and Bluetooth. More info: https://github.com/signal11/hidapi
When using CMake to build, set BUILD_SHARED_LIBS to ON to build hidapi as a shared library. Otherwise, it'll build as a static library.
The rest of the changes are defined in diff files from existing files from the 2.0.9 source zip. The file path is defined in the first line of each file.
CMakeLists.diff
This is a patch of the main SDL2 CMake file. This adds the joystick/hidapi/*.c files to SDL2 and references the CMake file that defines the hidapi build. There are also several build changes to allow a sample program to build and run with SDL2.
HIDDeviceManager.diff
The code to load a hidapi shared library is removed since the SDL2 CMake file may be configured to build hidapi as a static library so loading the SDL2 library or a program that statically linked to the SDL2 library will be sufficient to load the hid native functions. Instead of an unhandled exception if the functions aren't found, I now log to logcat and continue.
SDL_config.h.diff
Add SDL_JOYSTICK_HIDAPI so the appropriate code is included when this feature is enabled.
SDL_config_iphoneos.diff
Enable SDL_JOYSTICK_HIDAPI for iOS
I also used the patched SDL 2.0.9 in a closed source project.
I ran the programs on:
Windows 10 Pro ver. 1809
Ubuntu 16.04 LTS 64-bit
macOS High Sierra 10.13.6
Moto X Pure Edition (Android)
iPhone 4S
Programs loaded and ran fine.
On 2019-05-01 16:39:03 +0000, ZZ wrote:
It looks like that I have been bitten hard by this issue today on Shield TV/AS3.4. I don't use the standard app layout and because of various reasons it took me half a day until I found this bug report. Will this be committed to a working repository any time soon?
On 2019-08-24 09:57:57 +0000, ZZ wrote:
There is still no support for hidapi with CMake builds in 2.0.10 I guess?
On 2019-08-24 21:43:21 +0000, Steve Robinson wrote:
Yeah, I didn't try it out, but looking through the code it looks like it's still not fixed.
Hey SDL2 authors, please make CMake your only build system. It's the dominant build system for multiplatform C/C++ work. It already mostly works to build SDL2, just keep it up-to-date. If you still want to provide Xcode, make, and Visual Studio projects just use what CMake generates.
Also, while we're on the topic of best practices, using GitHub/GitLab and a CI would help formalize the collaboration process. I bet it would speed up development for you as well.
Build, CI, and dev workflows are my professional specialty. I'm happy to help out because I think SDL2 is fantastically useful. So hey, stop ignoring me and let's make this happen :)
On 2019-08-25 08:55:54 +0000, ZZ wrote:
Steve, this patches above have submitted them? Do you have any ideas why aren't there in?
Every time I try to upgrade SDL2 have to manually fix the build and everytime I don't remember anything and I am wasting time researching the causes.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Error screen shot (Screen Shot 2015-03-07 at 10.44.22 AM.png, image/png, 2019-04-19 01:43:36 +0000, 311196 bytes)Error screen shot (2019-04-18 18.28.33.png, text/plain, 2019-04-19 01:44:51 +0000, 167937 bytes)Reported in version: 2.0.9
Reported for operating system, platform: Android (All), ARM
Comments on the original bug report:
On 2019-04-19 01:43:36 +0000, Steve Robinson wrote:
On 2019-04-19 01:44:51 +0000, Steve Robinson wrote:
On 2019-04-19 01:46:47 +0000, Steve Robinson wrote:
On 2019-04-19 01:52:29 +0000, Steve Robinson wrote:
On 2019-04-19 01:53:08 +0000, Steve Robinson wrote:
On 2019-04-19 01:53:45 +0000, Steve Robinson wrote:
On 2019-04-19 01:54:17 +0000, Steve Robinson wrote:
On 2019-04-19 01:54:42 +0000, Steve Robinson wrote:
On 2019-04-19 02:00:32 +0000, Steve Robinson wrote:
On 2019-05-01 16:39:03 +0000, ZZ wrote:
On 2019-08-24 09:57:57 +0000, ZZ wrote:
On 2019-08-24 21:43:21 +0000, Steve Robinson wrote:
On 2019-08-25 08:55:54 +0000, ZZ wrote:
On 2019-08-25 08:57:32 +0000, ZZ wrote:
On 2019-08-25 14:49:37 +0000, Sylvain wrote:
On 2019-08-25 14:51:35 +0000, Sylvain wrote:
On 2019-08-25 18:44:53 +0000, ZZ wrote:
On 2020-04-19 08:06:12 +0000, Steve Robinson wrote:
On 2020-07-09 15:59:42 +0000, ZZ wrote:
On 2020-07-09 16:01:33 +0000, ZZ wrote:
On 2020-07-09 16:05:47 +0000, Steve Robinson wrote:
On 2020-07-09 16:24:57 +0000, ZZ wrote:
On 2020-07-09 16:28:58 +0000, ZZ wrote:
On 2020-07-09 17:36:51 +0000, ZZ wrote:
On 2020-07-16 02:33:32 +0000, Alexandre Tolstenko wrote:
On 2020-07-16 04:30:39 +0000, Steve Robinson wrote:
The text was updated successfully, but these errors were encountered: