Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android HIDDeviceManager function needs to be public #2987

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

Android HIDDeviceManager function needs to be public #2987

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: don't know
Reported for operating system, platform: Android (All), All

Comments on the original bug report:

On 2018-09-25 19:28:20 +0000, Sylvain wrote:

Can't run an android app without declaring the JNI interface function as public.

--- a/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java Tue Sep 25 08:23:57 2018 -0700
+++ b/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java Tue Sep 25 21:25:22 2018 +0200
@@ -504,7 +504,7 @@
////////// JNI interface functions
//////////////////////////////////////////////////////////////////////////////////////////////////////

  • boolean openDevice(int deviceID) {
  • public boolean openDevice(int deviceID) {
    // Look to see if this is a USB device and we have permission to access it
    for (HIDDeviceUSB device : mUSBDevices.values()) {
    if (deviceID == device.getId()) {
    @@ -539,7 +539,7 @@
    return false;
    }
  • int sendOutputReport(int deviceID, byte[] report) {
  • public int sendOutputReport(int deviceID, byte[] report) {
    try {
    Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
    HIDDevice device;
    @@ -556,7 +556,7 @@
    return -1;
    }
  • int sendFeatureReport(int deviceID, byte[] report) {
  • public int sendFeatureReport(int deviceID, byte[] report) {
    try {
    Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
    HIDDevice device;
    @@ -573,7 +573,7 @@
    return -1;
    }
  • boolean getFeatureReport(int deviceID, byte[] report) {
  • public boolean getFeatureReport(int deviceID, byte[] report) {
    try {
    Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
    HIDDevice device;
    @@ -590,7 +590,7 @@
    return false;
    }
  • void closeDevice(int deviceID) {
  • public void closeDevice(int deviceID) {
    try {
    Log.v(TAG, "closeDevice deviceID=" + deviceID);
    HIDDevice device;

On 2018-09-26 03:12:37 +0000, Sam Lantinga wrote:

Fixed, thanks!
https://hg.libsdl.org/SDL/rev/18445c9fc2f3

In the future, please add patches as attachments. I had to redo this one by hand since the pasted patch was wrapped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant