• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

GameInputEvent.DEVICE_REMOVED doesn't trigger itself

New Here ,
Jan 19, 2016 Jan 19, 2016

Copy link to clipboard

Copied

Hi everyone,

I'm trying to detect when my gamepad is deconnected in order to reconnect it later. When I initialize my gamepad, I add listener to GameInputEvent.DEVICE_ADDED, and GameInputEvent.DEVICE_REMOVED. The first one well triggers itselft but only at the beginning, and when I add some others devices it is not trigger again. Moreover event DEVICE_REMOVED, doesn't trigger at all.

if (Game.gameinput == null){

       Game.gameinput = new GameInput();

       gameinput.addEventListener(GameInputEvent.DEVICE_ADDED,onDeviceAdded);

       gameinput.addEventListener(GameInputEvent.DEVICE_REMOVED,onDeviceRemoved);

  }

This function is static, and onDeviceAdded and onDeviceRemoved too.

Do you have some ideas ?

Thanks.

TOPICS
Air beta

Views

524

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 19, 2016 Jan 19, 2016

Copy link to clipboard

Copied

Hi,

Could you please try reproducing the bug at your end using the sample project shared below:

Dropbox - untitled folder‌

And please share the specification of the gamepad that you are using at your end.

Thanks,

Adobe AIR Team

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 19, 2016 Jan 19, 2016

Copy link to clipboard

Copied

LATEST

Hi,

Thank you for your time. The sample project you give me works perfectly. I'm using a Flare device https://flareplay.com/‌ with its own gamepad. So i target Android TV device. I test your sample project on the same device.

I am also using Haxe language to develop. Maybe it's the problem but I'm using a lot of others flash lib without any trouble..:/

Antonin.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines