Skip to content

Loading…

laptop accelerometer disturbs SDL and frozen-bubble #224

Open
dod38fr opened this Issue · 5 comments

2 participants

@dod38fr
PerlGameDev member

Hello

In Debian bug 664546 ( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=++664546 ), user is complaining that hiscore screen is displayed for only 1 second or so on his laptop.

Turns out that some (all ?) hp laptop have an embedded accelerometer to protect the disks in case of mechanical shock. This accelerometer is handled by joydev kernel module and is seen as a joystick by frozen-bubble.

This device is constantly sending key events to sdl loop. This triggers the issue with the highscrore screen

Currently, the only work-around I've found it to remove the joydev kernel module.

I guess that frozen-bubble should have an option to ignore the joystick or (and ?) have dedicated code to ignore accelerometer type joysticks.

Hope this helps

@FROGGS
PerlGameDev member

Would be good to detect this somehow, so that we not disable a real joystick...

Is there a way we get some more information? I just have access to lenovo and dell laptops.

@dod38fr
PerlGameDev member

frozen-bubblle provides a --joystick info which prints:

found 1 joystick(s)
1: ST LIS3LV02DL Accelerometer

See lines 2680 of frozen-bubble. It does use SDL::Joystick::name to get this info.

Now the question is: should frozen-bbuble uses a blacklist, provides an option to disable the joystick or both ?

HTH

@dod38fr
PerlGameDev member

I'm going to try a patch to blacklist joystick known as accelerometers. I hope that this will take care of most cases.

@FROGGS
PerlGameDev member

k

Let me know if you need help.

@dod38fr
PerlGameDev member

Sorry, I forgot to follow-up. The Debian patch that kicks out accelerometers works fine. No user has complained for a year. ok, this patch is more a work-around than a proper fix.

All the best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.