Controller Prioritization

46 views
Skip to first unread message

tony971

unread,
May 10, 2013, 10:07:47 AM5/10/13
to mupen...@googlegroups.com
Hello, I was wondering how mupen64plus decides which controller should be controller 1 when multiple are plugged in. Is it which controller is listed first on the InputAutoCfg? I often have xbox controllers and N64 controllers (via adapter) plugged in at the same time. Whenever this happens, the xbox controller is assumed controller 1. I'd like to make it so that controller adapters take priority over third party controllers since the average user would probably want to use an N64 controller before a button mapped gamepad.

Thanks,
Tony

Richard Goedeken

unread,
May 10, 2013, 11:10:01 PM5/10/13
to mupen...@googlegroups.com
Tony,

I'm actually in the process of modifying the autoconfig behavior. Currently,
if your controllers are auto-configured, then they will be assigned to N64
controllers according to their SDL device number ordering. If you want to swap
the order of two devices, you can just swap the USB ports into which they're
plugged.

I considered your suggestion to support some sort of priority list, but in the
end I decided I didn't want that much complexity. With the new autoconfig
behavior, there will be a new 'mode' parameter to explicitly tell the input
plugin how to handle that N64 controller. The options will be: 0 for Fully
Manual (like the original blight input plugin behavior), 1 for Auto w/ Named
Joystick, where it will autoconfigure the first available (in SDL device
number ordering) joystick with the given name, and 2 for Fully Auto, which
will autoconfig the first available joystick of any type (this is the current
behavior for auto).

I think you will be able to set up your desire behavior by selecting mode 1
with your N64 adapter controller's name to force this controller to be in the
first port. The only behavior that I haven't decided is how to handle the
fallback case for mode 1 in which there is no connected SDL joystick with the
given name. I can either fall back to mode 2 (fully auto), or configure this
n64 port to be unplugged. Anyone care to voice a preference?

Richard
> --
> You received this message because you are subscribed to the Google Groups
> "mupen64plus" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mupen64plus...@googlegroups.com.
> To post to this group, send email to mupen...@googlegroups.com.
> Visit this group at http://groups.google.com/group/mupen64plus?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

tony971

unread,
May 10, 2013, 11:32:08 PM5/10/13
to mupen...@googlegroups.com, Ric...@fascinationsoftware.com
If you configure the port unplugged, some games might freak out about not using port one. If you fall back to mode two, there needs to be some memory system that'll remember that the unplugged controller is supposed to be controller one if and when it's plugged in again.

Richard Goedeken

unread,
May 11, 2013, 12:40:24 AM5/11/13
to tony971, mupen...@googlegroups.com
Yes, if it falls back to mode 2 it should not change the 'name' parameter, so
that it can autoconfig with the desired controller if it is later plugged in.
Reply all
Reply to author
Forward
0 new messages