Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Sort remap by gamepad" ignored when launching ROMs directly through CLI. #17321

Open
2 tasks done
dvessel opened this issue Jan 1, 2025 · 5 comments
Open
2 tasks done

Comments

@dvessel
Copy link

dvessel commented Jan 1, 2025

Is there an existing issue for this?

  • This is a bug in RetroArch frontend
  • I have searched the existing issues

Description

Launching a game directly from the command line will not autoload input remaps for a controller. Launching the app first through the GUI or command line then navigating through the menu to open the game loads remapped inputs as expected.

This is on MacOS through a zsh terminal.

Expected behavior

Automatically load the remap file regardless of how a game was launched.

Steps to reproduce the bug

  1. Launch RetroArch nightly and run a game.
  2. Create a custom mapping for the controller, save it and quit.
  3. Launch a game directly that would be affected by the custom mapping:
    open -b com.libretro.dist.RetroArch --args -L mame ~/path/to/rom.zip
  4. Check for remapped inputs.

Version/Commit

1.20.0 (git ae79514)

Bisect Results

No response

Check in the nightly version

Yes, this is reproduced in the nightly build

Platform & operating system

MacOS 15.2 (24C101) ARM

Affected Cores

No response

Environment information

M1 Max running as x86 under Rosetta

Line 73 in the log file is when the remap is loaded properly:
https://gist.github.com/dvessel/b713508d51b741a34816a722e7b74230#file-retroarch-log-L73

Relevant log output

[INFO] --libretro argument "mame" matches core file "/Users/???/Library/Application Support/RetroArch/cores/mame_libretro.dylib".
[INFO] RetroArch 1.20.0 (Git ae7951445)
[INFO] === Build =======================================
[INFO] CPU Model Name: Apple M1 Max
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2 
[INFO] Version: 1.20.0
[INFO] Git: ae7951445
[INFO] Built: Dec 31 2024
[INFO] =================================================
[INFO] [Input]: Found input driver: "cocoa".
[INFO] [Core]: Loading dynamic libretro core from: "/Users/???/Library/Application Support/RetroArch/cores/mame_libretro.dylib"
[INFO] [Overrides]: Redirecting save file to "/Users/???/Library/Application Support/RetroArch/saves/MAME/futaribl.srm".
[INFO] [Overrides]: Redirecting save state to "/Users/???/Library/Application Support/RetroArch/states/MAME/futaribl.state".
[INFO] [Environ]: GET_CORE_OPTIONS_VERSION.
[INFO] [Environ]: GET_LANGUAGE: "0".
[INFO] [Environ]: RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL.
[INFO] [Environ]: SET_CONTROLLER_INFO.
[INFO] [Environ]: SET_SUPPORT_NO_GAME: yes.
[INFO] [Environ]: GET_LED_INTERFACE.
[INFO] [Environ]: GET_LOG_INTERFACE.
[INFO] [Environ]: SYSTEM_DIRECTORY: "/Users/???/Library/Application Support/RetroArch/bios".
[INFO] [Environ]: CORE_ASSETS_DIRECTORY: "/Users/???/Library/Application Support/RetroArch/downloads".
[INFO] [Environ]: SAVE_DIRECTORY: "/Users/???/Library/Application Support/RetroArch/saves/MAME".
[INFO] [Environ]: SET_PIXEL_FORMAT: XRGB8888.
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [Environ]: SET_KEYBOARD_CALLBACK.
[libretro INFO] ------------------------
[libretro INFO] MAME 0.272 (603e0a4f0)
[libretro INFO] ------------------------
[INFO] [Content]: Content loading skipped. Implementation will load it on its own.
[libretro INFO] Starting game: "/Users/???/Games/Emulation/Arcade/futaribl.zip"
[libretro INFO] Game name: futaribl
[libretro INFO] Game description: Mushihime-Sama Futari Black Label - Another Ver (2009/11/27 INTERNATIONAL BL)
[INFO] [State]: found_last_state_slot: #0
[INFO] [SRAM]: Skipping SRAM load.
[INFO] [State]: Found auto save state in "/Users/???/Library/Application Support/RetroArch/states/MAME/futaribl.state.auto".
[INFO] [State]: Auto-loading save state from "/Users/???/Library/Application Support/RetroArch/states/MAME/futaribl.state.auto" succeeded.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Core]: Geometry: 320x240, Aspect: 0.750, FPS: 60.02, Sample rate: 48000.00 Hz.
[INFO] [Video]: Set video size to: fullscreen.
[INFO] [Vulkan]: Vulkan dynamic library loaded.
[INFO] [Vulkan]: Found vulkan context: "cocoavk".
[INFO] [Vulkan]: Detecting screen resolution: 4112x2572.
[INFO] [macOS]: Native window size: 4112 x 2572.
[INFO] [Vulkan]: Found GPU at index 0: "Apple M1 Max".
[INFO] [Vulkan]: Using GPU index 0.
[INFO] [Vulkan]: Using semaphores for WSI acquire.
[INFO] [Vulkan]: Using GPU: "Apple M1 Max".
[INFO] [Vulkan]: Queue family 0 supports 1 sub-queues.
[INFO] [Vulkan]: Got 3 swapchain images.
[INFO] [Vulkan]: Using resolution 4112x2572.
[INFO] [Vulkan]: Using BGRA8888 format.
[INFO] [Shaders]: Specific shader preset found at "/Users/???/Library/Application Support/RetroArch/config/MAME/MAME.slangp".
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/misc/shaders/grade.slang".
[INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #0.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-first-pass-linearize-crt-gamma-bob-fields.slang".
[INFO] [slang]: Using render target format R8G8B8A8_SRGB for pass output #1.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-scanlines-vertical-interlacing.slang".
[INFO] [slang]: Using render target format R8G8B8A8_SRGB for pass output #2.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-bloom-approx.slang".
[INFO] [slang]: Using render target format R8G8B8A8_SRGB for pass output #3.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/blurs/shaders/royale/blur5fast-vertical.slang".
[INFO] [slang]: Using render target format R8G8B8A8_SRGB for pass output #4.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/blurs/shaders/royale/blur5fast-horizontal.slang".
[INFO] [slang]: Using render target format R8G8B8A8_SRGB for pass output #5.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-mask-resize-vertical.slang".
[INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #6.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-mask-resize-horizontal.slang".
[INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #7.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang".
[INFO] [slang]: Using render target format R8G8B8A8_SRGB for pass output #8.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-brightpass.slang".
[INFO] [slang]: Using render target format R8G8B8A8_SRGB for pass output #9.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-bloom-vertical.slang".
[INFO] [slang]: Using render target format R8G8B8A8_SRGB for pass output #10.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-bloom-horizontal-reconstitute.slang".
[INFO] [slang]: Using render target format R8G8B8A8_SRGB for pass output #11.
[INFO] [slang]: Compiling shader: "/Users/???/Library/Application Support/RetroArch/shaders/shaders_slang/crt/shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.slang".
[INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #12.
[INFO] [Vulkan filter chain]: Creating framebuffer 1024x1024 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 1024x1024 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 1024x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 320x240 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 320x240 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 320x240 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 64x120 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 160x120 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 4294967295 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[INFO] [Joypad]: Found joypad driver: "mfi".
[INFO] [Video]: Found display server: "apple".
[INFO] [Audio]: Set audio input rate to: 47980.81 Hz.
[INFO] [Vulkan filter chain]: Creating framebuffer 1024x1024 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 1024x1024 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 1024x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 320x240 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 320x240 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 320x240 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 64x120 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 160x120 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 4294967295 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [CoreAudio3]: Using buffer size of 24576 bytes: (latency = 64 ms)
[INFO] [Audio]: Started synchronous audio driver.
[INFO] [Display]: Found display driver: "vulkan".
[INFO] [Playlist]: Loading history file: "/Users/???/Library/Application Support/RetroArch/config/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/Users/???/Library/Application Support/RetroArch/config/content_music_history.lpl".
[INFO] [Playlist]: Loading history file: "/Users/???/Library/Application Support/RetroArch/config/content_video_history.lpl".
[INFO] [Playlist]: Loading history file: "/Users/???/Library/Application Support/RetroArch/config/content_image_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/Users/???/Library/Application Support/RetroArch/config/content_favorites.lpl".
[INFO] [Input]: Game Focus => ON
[INFO] [CloudSync] begin succeeded
[INFO] [Vulkan filter chain]: Creating framebuffer 1024x1024 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 1024x1024 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 1024x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 320x240 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 320x240 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 320x240 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 64x120 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 160x120 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 4294967295 level(s)).
[INFO] [Vulkan filter chain]: Creating framebuffer 2560x1920 (max 1 level(s)).
[INFO] [State]: Loading state "/Users/???/Library/Application Support/RetroArch/states/MAME/futaribl.state.auto", 168295576 bytes.
[INFO] [State]: Saving state "RAM", 168295576 bytes.
[INFO] [CloudSync] server manifest fetch succeeded
[INFO] [CloudSync] created manifest with 262 files
[WARN] [CloudSync] opened local manifest
[INFO] [CloudSync] created manifest with 262 files
[INFO] [CloudSync] created in-memory manifest of current disk state
[INFO] [CloudSync] finished processing manifests
[INFO] [CloudSync] wrote /Users/???/Library/Application Support/RetroArch/downloads/manifest.local
[INFO] [CloudSync] finished after 0.416692 seconds, 0 files uploaded, 0 files downloaded
[INFO] [Vulkan filter chain]: Updating framebuffer size 320x240 (format: 37).
[INFO] [Vulkan filter chain]: Updating framebuffer size 320x240 (format: 43).
[INFO] [Vulkan filter chain]: Updating framebuffer size 320x1920 (format: 43).
[INFO] [mfi] controller given desired index 0
[INFO] [mfi] controller connected, beginning setup and autodetect
[INFO] [Autoconf]: Controller configured in port 1.
[INFO] [Input]: Game Focus => OFF
[INFO] Auto save state to "/Users/???/Library/Application Support/RetroArch/states/MAME/futaribl.state.auto" succeeded.
[INFO] [Config]: Saved new config to "/Users/???/Library/Application Support/RetroArch/config/retroarch.cfg".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 06 seconds.
[INFO] [Runtime]: Saving runtime log file: "/Users/???/Library/Application Support/RetroArch/playlists/logs/futaribl.lrtl".
[INFO] [Core]: Unloading game..
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [Core]: Saved core options file to "/Users/???/Library/Application Support/RetroArch/config/MAME/MAME.opt".
@dvessel
Copy link
Author

dvessel commented Jan 1, 2025

Looks like it's related to #8972. not related.

@hizzlekizzle
Copy link
Contributor

Can you verify that this also happened in 1.19.1 stable, since you're on a nightly?

@dvessel
Copy link
Author

dvessel commented Jan 1, 2025

@hizzlekizzle trying it on stable gave me a hint on what could be going on. There's a new option in nightly "Sort remap by gamepad" which I had enabled. It looks like launching directly through the cli ignores that setting.

Testing it on stable didn't work either but it reminded me of the setting so I moved the remap file so it wasn't specific to my particular controller and it worked. Doing the same for nightly also worked leaving the sort remap option being the likely cause.

@hizzlekizzle
Copy link
Contributor

ah, I see. okay, that's still a problem, obviously, but much more localized, which is great. Thanks for the additional info!

@gouchi
Copy link
Member

gouchi commented Jan 3, 2025

@dvessel Will it be possible to update the issue title with your findings ? Thank you.

@dvessel dvessel changed the title Launching roms directly through CLI ignores input remapping. "Sort remap by gamepad" ignored when launching ROMs directly through CLI. Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants