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

Mouse button input events are not picked up consistently on macOS #54458

Closed
keeganstothert opened this issue Oct 31, 2021 · 7 comments
Closed

Comments

@keeganstothert
Copy link

keeganstothert commented Oct 31, 2021

Godot version

3.3.4

System information

macOS Monterey 12.0.1

Issue description

input events are not picking up consistently for left click events on apple silicon / Monterey

Steps to reproduce

create a brand new project and create an action that maps to any key and the left mouse button.

func _input(event):
	if event.is_action_pressed("spawn"):
		print("spawn")

the print line will fire when pressing the key but will only fire when double clicking or rapidly clicking the left mouse button. Every few times it will actually work as expected so you may have to restart the game once or twice if it appears to be working.

tested on x86 under manjaro and the issue does not exist.

tested under rosetta x86_64-apple-darwin and native aarch-apple-darwin on m1 MacBook issues occurs for both.

Minimal reproduction project

any brand new project on 3.3.4 on apple silicon and Monterey 12.0.1

@Calinou
Copy link
Member

Calinou commented Oct 31, 2021

Some questions to better understand the cause:

  • Can you reproduce this if you call Input.set_use_accumulated_input(false) in any script's _ready() function?
  • Can you reproduce this after disabling V-Sync? (Assuming macOS doesn't force V-Sync for all applications by now.)
  • Can you reproduce this after disabling V-Sync and setting a FPS cap like 60 using the Force Fps option in the Project Settings?

tested on x86 under manjaro and the issue does not exist.

This actually does happen on Linux, but hasn't been reported on macOS yet: #48369

@Calinou Calinou changed the title intermittent input issues apple silicon Input events are not picked up consistently on macOS Oct 31, 2021
@Calinou Calinou changed the title Input events are not picked up consistently on macOS Mouse button input events are not picked up consistently on macOS Oct 31, 2021
@bruvzg
Copy link
Member

bruvzg commented Oct 31, 2021

Might be related to #54306, can you reproduce it after switching to another app and back?

@keeganstothert
Copy link
Author

keeganstothert commented Oct 31, 2021

@bruvzg switching to another app and back does indeed resolve the issue, it definitely seems related

@insomnocrat
Copy link

I'm encountering the same issue, and I can reproduce it using the steps mentioned in #8653 (moving the mouse after clicking run vs not moving the mouse).

@keeganstothert
Copy link
Author

keeganstothert commented Oct 31, 2021

@Calinou

  1. Input.set_use_accumulated_input(false) does not resolve it
  2. disabling V-Sync does not resolve it
  3. V-Sync and force fps does not resolve it

i've tested multiple times and ways and could not reproduce this issue on linux, only on macOS. This issue only appears to happen with the left mouse button all other input works

@akien-mga
Copy link
Member

Fixed by #54474.

@LordBrkica
Copy link

LordBrkica commented Nov 20, 2021

I am also encountering this issue on mac OS Monterey 12.0.1. Godot version is 3.4 stable mono.
Device is mac mini i3 2018, with UHD 630 GPU.

Bug occurs sporadically, 1 out of 10 times when I start the game the bug will occur.
When it occurs, its immediately obvious as my game starting UI elements (buttons) are also affected.

The Bug I would describe most simply as follows:

  • one normal left mouse click seems to be ignored/missed, one needs to double click and this is then registered as one normal click

GLES2/3 options are affected equally, and its not specific to one control type (e.g. Button) but seems to affect all controls equally.

Bug seems to go away after some time (window switching and window minimizing/ maximizing maybe helps).

If I understood correctly, this bug should have been solved in 3.4 but for me its still there...

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

6 participants