[Samsung Galaxy S 5 Unified Development] ljani:
I'm a little confused with this. I know you are too :D

Anyway, consider this. I just logcat'd Snes9xEX and got this:

I/imagine (26780): input:android: from other source: Unhandled value, 524x1186
I/imagine (26780): input:android: from other source: Unhandled value, 525x1189
I/imagine (26780): input:android: from other source: Unhandled value, 529x1228
I/imagine (26780): input:android: from other source: Unhandled value, 523x1305
I/imagine (26780): input:android: from other source: Unhandled value, 493x1396

Now, looking at the source, there's for example this line. This means that whatever is returned by AInputEvent_getSource (on this line) is neither AINPUT_SOURCE_TOUCHSCREEN nor AINPUT_SOURCE_TRACKBALL. (Please keep in mind that the the logwarn line is commented out and doesn't match the log level in the log, because the source and the binary aren't the same version.)

I wrote a simple application (Source here and precompiled debug application here, use logcat for viewing output) to dump those source numbers and here's what I got:

02-26 22:04:24.928 9891-9891/io.ljani.klte.inputeventdump W/klte-inputeventdump﹕ Type: 0x00000002 Source: 0x00005002
02-26 22:04:24.944 9891-9891/io.ljani.klte.inputeventdump W/klte-inputeventdump﹕ Type: 0x00000002 Source: 0x00005002
02-26 22:04:24.961 9891-9891/io.ljani.klte.inputeventdump W/klte-inputeventdump﹕ Type: 0x00000002 Source: 0x00005002
02-26 22:04:24.978 9891-9891/io.ljani.klte.inputeventdump W/klte-inputeventdump﹕ Type: 0x00000002 Source: 0x00005002
02-26 22:04:24.995 9891-9891/io.ljani.klte.inputeventdump W/klte-inputeventdump﹕ Type: 0x00000002 Source: 0x00005002
02-26 22:04:25.012 9891-9891/io.ljani.klte.inputeventdump W/klte-inputeventdump﹕ Type: 0x00000002 Source: 0x00005002

Clearly, it's not the AINPUT_SOURCE_TOUCHSCREEN, which Snes9x expects. Here's list of the enums:

enum {
AINPUT_SOURCE_CLASS_MASK = 0x000000ff,

AINPUT_SOURCE_CLASS_NONE = 0x00000000,
AINPUT_SOURCE_CLASS_BUTTON = 0x00000001,
AINPUT_SOURCE_CLASS_POINTER = 0x00000002,
AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004,
AINPUT_SOURCE_CLASS_POSITION = 0x00000008,
AINPUT_SOURCE_CLASS_JOYSTICK = 0x00000010,
};

enum {
AINPUT_SOURCE_UNKNOWN = 0x00000000,

AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON,
AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON,
AINPUT_SOURCE_GAMEPAD = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON,
AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER,
AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER,
AINPUT_SOURCE_STYLUS = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER,
AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
AINPUT_SOURCE_TOUCH_NAVIGATION = 0x00200000 | AINPUT_SOURCE_CLASS_NONE,
AINPUT_SOURCE_JOYSTICK = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK,

AINPUT_SOURCE_ANY = 0xffffff00,
};

Verdict (tl;dr):

So, my guess is that someone does bitwise OR operation (AINPUT_SOURCE_TOUCHSCREEN | AINPUT_SOURCE_STYLUS) for the input somewhere and it should be only AINPUT_SOURCE_TOUCHSCREEN (we can't use touchscreen AND stylus at the same time, can we?). But I have no idea where to look for it, so I hope you have better idea how the sources are structured and can find the bug.

EDIT: Also considering there's AINPUT_SOURCE_ANY, it is probably a bug in Snes9x/ScummVM/etc, that they should be doing bitwise checks, not switch-cases. I don't know, but someone said that this problem is only with a handful of devices, so I think we should fix it at our end, because we have no stylus.