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

In-Game: [Android] Connected controllers/gamepads status does not update unless the app is re-focused #5329

Closed
2 tasks done
itsCruiseElroy opened this issue Apr 4, 2024 · 2 comments
Assignees
Labels
runner-bug In-game bugs with the "GameMaker Studio 2" runtimes
Milestone

Comments

@itsCruiseElroy
Copy link

itsCruiseElroy commented Apr 4, 2024

Description

When connecting, turning on, or turning off a controller or other Bluetooth device to an Android device, GameMaker is only able to accurately update the list whenever the game loses and regains focus (such as when going to the home screen and re-opening the game from the background apps); the list does not update in real time. This makes controller disconnections impossible to detect, for instance.

This affects both VM and YYC compiling. The sample project was tested on Google Pixel 5A and Samsung Galaxy S22, but the general issue seems to affect most, if not all, Android devices.

Sample project with contact us package: Controller Test.zip

Expected Change

Android games are able to detect when a controller connects or disconnects to the device in real time.

Steps To Reproduce

  1. Connect a controller to the Android device
  2. Start GameMaker and open the attached project
  3. Compile and run for Android, with the controller still turned on
  4. Take note of the name of the connected device
  5. Turn the controller off without putting the game in the background (this can usually be done by holding the home button for a few seconds)
  6. Notice that the list of connected devices has not updated
  7. Put the game in the background, then open it back up from the background
  8. After the game loses focus, the device list now updates properly
  9. Turn the controller back on, notice that it doesn't update the list
  10. Repeat steps 7 and 8

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.2.0 (Monthly)

Which platform(s) are you seeing the problem on?

Android

Contact Us Package Attached?

  • I have attached my Contact Us Package

Sample Project Added?

  • I have included a small sample project
@itsCruiseElroy itsCruiseElroy added the runner-bug In-game bugs with the "GameMaker Studio 2" runtimes label Apr 4, 2024
@stuckie stuckie added this to the 2024.4 milestone Apr 5, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Workload Apr 8, 2024
@gurpreetsinghmatharoo gurpreetsinghmatharoo moved this from Done to Ready for QA in Team Workload Apr 9, 2024
@YYBartT YYBartT moved this from Ready for QA to Done in Team Workload May 2, 2024
@YYBartT YYBartT self-assigned this May 2, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue May 3, 2024
YoYoGames/GameMaker-Bugs#5329

* Added function reference page
* Some small changes on the related gamepad pages
@YYBartT
Copy link

YYBartT commented May 3, 2024

Documented the function gamepad_enumerate() in the manual.

@YYBartT YYBartT moved this from Done to Ready for QA in Team Workload May 3, 2024
gurpreetsinghmatharoo added a commit to YoYoGames/GameMaker-Manual that referenced this issue May 9, 2024
* develop.bart:
  docs(feature): added documentation for physics_raycast YoYoGames/GameMaker-Bugs#2762
  docs(feature): documented gamepad_enumerate YoYoGames/GameMaker-Bugs#5329
  docs(feature): skeleton_animation_clear optional parameters YoYoGames/GameMaker-Bugs#1570
  docs(feature): documented dbg_view_exists and dbg_section_exists YoYoGames/GameMaker-Bugs#4931
  docs(feature): documented dbg_view_exists and dbg_section_exists YoYoGames/GameMaker-Bugs#4931
  docs(feature): YoYoGames/GameMaker-Bugs#1570
  docs(general): mentioned that any attached files are uploaded privately
  docs(feature): smaller custom format screenshot YoYoGames/GameMaker-Bugs#5495
  docs(feature): documented the new dbg_text_separator function YoYoGames/GameMaker-Bugs#4998
  docs(feature): Switch to the docking branch of imgui YoYoGames/GameMaker-Bugs#4905
  docs(general): document OS and audio device limitations when using audio YoYoGames/GameMaker-Bugs#5580
  docs(feature): Add an option to specify "step" in the ImGUI slider control YoYoGames/GameMaker-Bugs#2971

# Conflicts:
#	Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_length.htm
#	Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider.htm
#	Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider_int.htm
@YYDan
Copy link
Collaborator

YYDan commented Dec 12, 2024

Only just seeing this one now, because coincidentally I was looking into why 2024.8 and 2024.11 don't do the Async System event for gamepads found/lost on Android.

Have now verified this all works correctly in 2024.11 and added an updated sample to show how to achieve both methods of getting pad changes.

testAndroidPadEnumeration.zip

@YYDan YYDan moved this from Ready for QA to Verified in Team Workload Dec 12, 2024
@YYDan YYDan changed the title [Android] Connected controllers/devices do not update until the app is re-focused In-Game: [Android] Connected controllers/gamepads status does not update unless the app is re-focused Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runner-bug In-game bugs with the "GameMaker Studio 2" runtimes
Projects
Status: Verified
Development

No branches or pull requests

5 participants