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

Can't type in textfields when running from iOS simulator #27984

Open
smallketchup82 opened this issue Apr 24, 2024 · 10 comments
Open

Can't type in textfields when running from iOS simulator #27984

smallketchup82 opened this issue Apr 24, 2024 · 10 comments

Comments

@smallketchup82
Copy link
Contributor

Type

Game behaviour

Bug description

When running osu! in an iOS simulator, you can't type into textfields. Keybinds like ppp still work, so input is being detected. Typing on other apps like safari works, so it doesn't seem to be an issue with how my xcode/keyboard is set up.

Simulator specs:

  • iPhone 15
  • iOS 17.4
  • Xcode 15.3

My Macbook's specs:
image

Running osu! master on commit a35bf77

Screenshots or videos

No response

Version

a35bf77

Logs

Since this is an iOS simulator, I can't get the logs folder. I've included the debug logs from the console output
logs.txt

@Susko3
Copy link
Member

Susko3 commented Apr 24, 2024

Relevant bit from the logs (not sure what it means):

2024-04-24 10:40:21.292299-0400 osu.iOS[54572:4257604] [HardwareKeyboard] -[UIApplication getKeyboardDevicePropertiesForSenderID:shouldUpdate:usingSyntheticEvent:], failed to fetch device property for senderID (778835616971358209) use primary keyboard info instead.
2024-04-24 10:40:21.305208-0400 osu.iOS[54572:4257604] [HardwareKeyboard] -[UIApplication getKeyboardDevicePropertiesForSenderID:shouldUpdate:usingSyntheticEvent:], failed to fetch device property for senderID (778835616971358209) use primary keyboard info instead.

Could you enable SDL3 event logging and then post the output. Just add the following line to the main program:

SDL3.SDL_SetHint(SDL3.SDL_HINT_EVENT_LOGGING, "1"u8);

@smallketchup82
Copy link
Contributor Author

smallketchup82 commented Apr 25, 2024

@Susko3 Doesn't seem like I can do that. 1>Application.cs(12,13): Error CS0103 : The name 'SDL3' does not exist in the current context. There's no option to reference it from somewhere else either..?

I can do the same thing but change it to SDL2.SDL.SDL_SetHint(SDL2.SDL.SDL_HINT_EVENT_LOGGING, "1");, but when trying to run with that, I get System.DllNotFoundException: SDL2

@Susko3
Copy link
Member

Susko3 commented Apr 25, 2024

You shouldn't have access to SDL2 on the latest master, the SDL3 update has already been merged. Please delete bin and obj folders (they should be in osu.iOS/) and then clean and rebuild your solution and project. Also ensure you're on the latest master commit.

@smallketchup82
Copy link
Contributor Author

smallketchup82 commented Apr 25, 2024

Right, I was accidentally on a different branch when I tested it earlier today. Going back to the commit listed in the original comment, I still get a System.DllNotFoundException: SDL3 when I put SDL3.SDL_SetHint(SDL3.SDL_HINT_EVENT_LOGGING, "1"u8); in Application.cs. Probably an issue with the entrypoint.

@smoogipoo
Copy link
Contributor

You should put that hint in SDL3Window. Check the existing code there for where you might put it.

@Susko3
Copy link
Member

Susko3 commented Apr 25, 2024

Just put it anywhere in the game, like the constructor of OsuGame, if you don't have a local checkout of framework (required for SDL3Window change).

@smallketchup82
Copy link
Contributor Author

smallketchup82 commented Apr 25, 2024

Got it, I put it in the load() function of OsuGame. Here are the logs:
log2.txt

@smallketchup82
Copy link
Contributor Author

smallketchup82 commented Apr 25, 2024

Hold on, I forgot to enable hardware keyboard. Disregard the above logs
log3.txt

I started the game, opened the sign in menu, and tried pressing random keys into the username field.

@Susko3
Copy link
Member

Susko3 commented Apr 25, 2024

I presume you're typing with your mac keyboard. What if you instead try to type with the on-screen keyboard in iOS (if that option is available)?

I've created an upstream issue: libsdl-org/SDL#9624. Feel free to subscribe to it.

@smallketchup82
Copy link
Contributor Author

smallketchup82 commented Apr 25, 2024

If I disable hardware keyboard (so that it cannot recognize my macbook keyboard), the software keyboard doesn't show, neither automatically nor manually (via the toggle software keyboard button).

The on screen keyboard also does not show if my hardware keyboard is turned on, nether automatically nor manually.

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

No branches or pull requests

3 participants