jbrandwood / liberis

MIT License
7 stars 2 forks source link

eris_pad_type() not working on real machine #10

Closed dshadoff closed 1 year ago

dshadoff commented 1 year ago

In the examples/fxpad example, when this runs on a real machine, the pad type appears as "NONE" when FX-PAD is attached, or when mouse is attached. This is because the return value of eris_pad_type is always 0 on a real machine.

On Mednafen, eris_pad_type() returns values which match the input type - but this is not the same behaviour as on a real PC-FX.

dshadoff commented 1 year ago

The original issue was related to issue # 11 - when the pad_type is called, it assumes that data is already waiting (except that it isn't). So bad data is returned. Pull request #12 corrects this, so I am closing.

Additionally, pad_read() was stripping off the pad type portion of the return value, forcing two separate scans (which is silly). That was also corrected in the pull request.