Skip to main content

PlayStation 5 Controller Support for Stardew Valley on MacOS

This covers both the PlayStation 5 DualSense controller as well as the PlayStation Edge DualSense Controller.

As of Feb 12 2024, the current stable version of Stardew Valley will not recognize PS5 controllers in Steam. The problem is that the SDL library (Simple DirectMedia Layer) is out-of-date.

The solution is to replace Stardew Valleyโ€™s copy of libSDL with a newer version.

Note that the library weโ€™re replacing will likely get overwritten every time Stardew Valley updates; you may need to run these steps with every update.

info

While Iโ€™ve tested this with a PlayStation DualSense Edge controller, chances are that this should work with any modern controller that doesnโ€™t work for you like the XBox Series X or Nintendo Joycons. If either of these fixes work for you, please let me know and Iโ€™ll update this!

Option 1: Download A Pre-Built Versionโ€‹

If you do not have XCode installed (and do not want to install it), then your only option is to download a pre-built binary from somewhere else.

I have compiled 2.28.5 (the last version of libSDL2) and provided it here.

  1. Download libSDL2-2.0.0.dylib and unzip it.
  2. Replace the original version with the version we just downloaded:
    cp ~/Downloads/libSDL2-2.0.0.dylib ~/Library/Application\ Support/Steam/steamapps/common/Stardew\ Valley/Contents/MacOS/
  3. Run the file once to allow your computer to start it.
    1. Open Finder, press Command + Shift + G. Paste in ~/Library/Application\ Support/Steam/steamapps/common/Stardew\ Valley/Contents/MacOS/, then hit Enter.
    2. Find libSDL2-2.0.0.dylib, right-click and select Open. You will be told that the file isnโ€™t from a trustworthy source. click Open.
    3. A terminal window will open. As soon as it says [Process completed], you can quit the terminal with Command + Q.

Option 2: Compile libSDL2 Yourselfโ€‹

  1. Download XCode from the App Store
  2. Close the libSDL repository:
git clone https://github.com/libsdl-org/SDL
cd SDL
  1. Switch to the 2.28.5 tag:
git checkout release-2.28.5
  1. Compile using the terminal:
mkdir -p build
cd build
cmake .. "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"
cmake --build .
  1. Because you compiled libSDL2 yourself, itโ€™s already trusted by your computer. You just need to move it into place:
cp libSDL2-2.0.0.dylib ~/Library/Application\ Support/Steam/steamapps/common/Stardew\ Valley/Contents/MacOS/
  1. Verify compatibility version 2801.0.0 and current version 2801.5.0 are present:
otool -L ~/Library/Application\ Support/Steam/steamapps/common/Stardew\ Valley/Contents/MacOS/libSDL2-2.0.0.dylib  | grep libSDL2
 /Users/user/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libSDL2-2.0.0.dylib (architecture x86_64):
@rpath/libSDL2-2.0.0.dylib (compatibility version 2801.0.0, current version 2801.5.0)
/Users/user/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libSDL2-2.0.0.dylib (architecture arm64):
@rpath/libSDL2-2.0.0.dylib (compatibility version 2801.0.0, current version 2801.5.0)