Menu

#2201 Logitech F310 (Dual Action) not detected on macOS unless SDL_JOYSTICK_MFI=0

v3.x
open
nobody
None
SDL2x
x64sc
2026-02-08
2026-02-05
Steve
No

Description
On macOS, the Logitech F310 controller (reporting as “Logitech Dual Action”) is not enumerated by VICE when using the default SDL configuration.

If VICE is launched with the environment variable SDL_JOYSTICK_MFI=0, the controller is detected and functions correctly.

Environment
VICE version: 3.10 (SDL2 build)
Bundled SDL version: 2.32.10
Platform: macOS (Apple Silicon)
Controller: Logitech F310 (D-mode, appears as “Logitech Dual Action”)

Steps to Reproduce

  1. Connect Logitech F310 (switched to D)
  2. Launch VICE normally:
    x64sc -verbose -debug
  3. Observe the output
    SDLJoystick: No joysticks found.

Workaround

  1. Launch VICE with MFi joystick support disabled:
    SDL_JOYSTICK_MFI=0 x64sc -verbose -debug
  2. Observe the output
    SDLJoystick: Got 1 potential devices.
    SDLJoystick: SDL_JoystickNameForIndex(0) = "Logitech Dual Action"

Controller input works correctly when C64 port 2 is configured as a real joystick:
-joydev2 4

Control Tests

  • PS4 controller detected correctly without workaround
  • THEC64 Competition Pro USB joystick detected correctly without workaround
  • SDL testjoystick utility detects the F310 correctly

Discussion

  • gpz

    gpz - 2026-02-05

    Have you tried other SDL based apps? I don't think we can do much about it (in the SDL port anyway)

     
  • Steve

    Steve - 2026-02-05

    I tried it with the SDL testjoystick utility. Is there another (relatively simple) SDL based app you would like me to try it with?

     
  • gpz

    gpz - 2026-02-05

    No idea really (even less which are ported to macOS, those i had in mind only have windows binaries apparently)

    Did you build the testjoystick program yourself? And which SDL version does it use? Seems odd that it works with that, but not in VICE

     
  • Steve

    Steve - 2026-02-05

    Yes. I built SDL’s testjoystick utility myself from source using SDL release-2.30.9. The resulting binary is statically linked and reports: SDL-release-2.30.9-0-gc98c4fb. VICE, by contrast, is dynamically linked against SDL 2.32.10

    To make sure it wasn't an issue with SDL 2.32.10 I copied the VICE app, and replaced the linked 2.32.10 SDL lib with the 2.30.9 one. When I ran VICE is till reported No joysticks found, unless disabled MFi joystick support

     
  • gpz

    gpz - 2026-02-08

    BTW, what happens if you switch the pad to xinput? (Isn't that the preferred way anyway?)

     
  • Steve

    Steve - 2026-02-08

    X-Input is preferred by is less likely to work on linux and macs (or so all the documentation tells me). I tried it just in case , but no luck.

     
  • dqh

    dqh - 2026-02-08

    Does it work in the GTK build?

    That env var looks like it disables SDL use of the modern macOS game controller APIs. I think we need to make this into an SDL+macos only setting. It's good that you have a workaround.

     

Log in to post a comment.

MongoDB Logo MongoDB