Thanks, I'll keep it as a list of dictionaries for now. It's really nothing
more than this:
game_controller_db = [{...}, {...}]
I'll see if I can answer your questions:
The mapping DB is only parsed when gamepads are enumerated. First a guid is
created for the device, which is checked if it's in the mapping DB. If it is,
that specific mapping dict is used to map the buttons/axis correctly. It's fast
- basically instantaneous because it's only doing some dict queries.
To clarify, nothing is loaded from disk by default. The internal mapping dict
is pre-defined, and will contain a few dozen mappings by default. A helper
function, add_mappings_from_file(), can be used to expand the internal DB from
an external text file. This is an option for application developers.
Basically we could just pre-define the entire community list, but the mapping
dictionary does get loaded into memory when gamepads are being created. I'll
have to check just how big it is.
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.