Skip to content

Latest build on ios 12 - not recognized any inputs from bluetooth controller or keyboard. #445

Open
TuTuc0 opened this issue Mar 16, 2019 · 13 comments

Comments

@TuTuc0
Copy link

TuTuc0 commented Mar 16, 2019

Bluetooth controller or keyboard worked fine on ios 10 or 11, but on ios 12 app does not recognize any input. Even BT keyboard does not type anything when console is opened.

@a1batross
Copy link
Member

@mittorn sounds like sdl2 bug? Maybe it should be updated to latest version for ios?

@TuTuc0
Copy link
Author

TuTuc0 commented Apr 7, 2019

Does it need to be compiled with latest ios sdk to make bt inputs to work?
Also new compiling should make app to properly adjust screen resolution for new 11 inch ipad pro. Currently Xash 3d is displayed with black bars around screen corners like every app that wasn't compiled with latest ios 11 sdk.

@TuTuc0
Copy link
Author

TuTuc0 commented Apr 19, 2019

Looking into log, it seems to recognize joystick. Do I need to type additional commands to get some input? I have also root access to app if that would help anything.

[2019:04:19|19:14:02] 1 joysticks found:
[2019:04:19|19:14:02] 0 : MFi Extended Gamepad
[2019:04:19|19:14:02] Pass +set joy_index N to command line, where N is number, to select active joystick

@mittorn
Copy link
Member

mittorn commented Apr 20, 2019

Try add -sdl_joy_old_api option

@TuTuc0
Copy link
Author

TuTuc0 commented Apr 20, 2019

Try add -sdl_joy_old_api option

Thanks a lot, controller works great now.

Slightly off-topic: when using external monitor through video adapter, and choosing one of windowed video modes, it will run nicely 16:9 only on monitor. But issue is I can't get controller (or any touch input) to work in this mode. However when mirroring screen works fine as it should (4:3 ratio).
Could be this achieved with command to use controller inputs also when viewing on external monitor?

@mittorn
Copy link
Member

mittorn commented Apr 21, 2019

Sorry, i do not know how it work

@TuTuc0
Copy link
Author

TuTuc0 commented Apr 21, 2019

Thanks for help anyway.
Not sure if I understand it correctly: when windowed, inputs are obtained only when window is active (focus), otherwise inputs are suspended which could be case when using external monitor.
I wonder if there could be any start command to gain focus to the other window or to always gather inputs, even in background.

@a1batross
Copy link
Member

External monitors? On iOS? Never heard of this. @TuTuc0

Probably this on SDL2 level. We don't have any checks on "lost focus" engine state in eventhandlers, i.e. always accepting incoming events from SDL2.

@TuTuc0
Copy link
Author

TuTuc0 commented Apr 23, 2019

Yes, it is possible to use external monitor via adaper/hub.
By default, everything is mirrored from ios device, unless set otherwise. In game video settings, if I select "current window size", it will use only external monitor but unfortunately gamepad input is ignored.

Here is a comparison of two modes: "Desktop size" and "Current window size"
2019-04-23 10 22 00
2019-04-23 10 15 25

@a1batross
Copy link
Member

You probably can try to report this to SDL2 developers, but I doubt that they will fix it unless we don't provide minimal example.

"Desktop mode" selection just does call SDL_GetDesktopDisplayMode on first screen, so engine knows native resolution of first screen. Looks like your external monitor becomes first for some reason.

And current window mode were done for resizing window, leaving no changes.

@TuTuc0
Copy link
Author

TuTuc0 commented Apr 23, 2019

It's the opposite. Setting Desktop makes external screen to "mirror" screen.
Setting current window and restarting game uses only the external monitor while leaving device gray blank. (after confirming start commands, which is firstly in "mirror" mode).

@a1batross
Copy link
Member

Anyway, I only supposed how it works.

@TuTuc0
Copy link
Author

TuTuc0 commented Apr 23, 2019

I think the SDL grabs mouse and keyboard input for active window, which could be main device currently displaying grey window and leaving external screen window without input.
But this isn't probably best place for discussion.
Original issue with controller was resolved thanks to "-sdl_joy_old_api" option. I will move on :)
Thanks for help.

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

No branches or pull requests

3 participants