/Moonlight-Switch

Moonlight port for Nintendo Switch

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Moonlight-Switch

Moonlight-Switch is a port of Moonlight Game Streaming Project for Nintendo Switch.

Thanks a lot to Rock88 and his Moonlight-NX, lots of streaming code has been lend from it 👍.

Screenshots

Preview

If you cannot use bitrate higher than 10 Mbps - read this!

To be able to use any streaming setting higher than 720p - resolution, 10MBbps - Bitrate, you need to overclock CPU of your console.

This leads from lack of access to GPU decoder and because of that all decoding performs on CPU, while it is not powerfull enough to handle it.

To learn more about that you can take a look at Sys-Clk homebrew or entire Atmosphere build - 4IFIR which includes everything you need to overclock your console

I DO NOT RESPOSIBLE FOR ANY DAMAGE TO YOUR CONSOLE IF ANYTHING WILL GO WRONG! I am using 4IFIR by myself and not find any issue, but everything possible. So think by you own head and be responsible for what you do with your devices!

Attension for developers

If you know how to debug Nintendo Switch Homebrew applications please let me know! I have no idea how to do this, I'm just an iOS developer who wants "click-click, UI debugger here we go" and not this GDB and Coredump stuff...

Jokes aside, I seriously couldn't find any usefull information about it, all crashes shows ?? instead of function names and I cannot understand what I do wrong.

Installing

  1. Download latest Moonlight-Switch release.
  2. Put Moonlight-Switch.nro to sdcard:/switch/Moonlight-Switch;
  3. Launch hbmenu over Title Redirection (for FULL RAM access);
  4. Launch moonlight.

Or download it from HB App Store

Discord

Feel free to join Moonlight discord server, you will find me there in "switch-help" channel

Controls

Mouse

With touch screen you can move your coursor, tap to left click, scroll 2 fingers to scroll.

While touching screen ZR and ZL buttons will work like left and right mouse buttons.

Also While touching screen L and R sticks will work like scrolling wheel.

USB mouse working as well.

Keyboard

You can use onscreen keyboard, tap 3 fingers on screen to show it.

USB keyboard working as well.

Gamepad

By default Switch gamepad configured as X360 gamepad (A/B and X/Y swapped). Key mapping available in application settings.

Up to 5 gamepads (includes handheld mode) supported. Half of joycons are also supported.

Ingame overlay

To open overlay, press - and + key simultaneously by default or Hold ESC on keyboard.

Key combination and holding time are configurable in settings.

Localization

  • English (100%)
  • Russian (100%)
  • German (86%)
  • Spanish (72%)
  • Japanese (70%)
  • Chinese (simplified) (86%)
  • Czech (70%) - unsupported yet, as HOS has no such system language

Contribution

If you'd like to improve existing language, or add a new one, follow the instruction:

  1. Ask a permission to modify language here
  2. Notify me by creating an issue with title "[Localization] - {Name of language}", in description write your nickname on POEditor
  3. After translation is done, notify me in issue created earlier

You have 2 options to add that translation:

  1. If you'd like your profile in "contributors" section, you could add that localization by creating a PR
  2. If you don't care, I could do that by myself

If you'd like to test your translation, you could follow build instructions, or ask me to create a build with your localization, I'll attach that build in issue.

ATTENTION! Currently there is no way to select language inside of app, it takes from system settings, so it is impossible to add locatization, that HOS doesn't support (that happend with Czech language).

Build Moonlight-Switch

  1. Clone this repo with submodules by git clone https://github.com/XITRIX/Moonlight-Switch.git --recursive
  2. cd into folder

Switch:

  1. Install core Switch packages dkp-pacman -Suy switch-dev
  2. Install other packages dkp-pacman -Suy switch-ffmpeg switch-mbedtls switch-opusfile switch-sdl2 switch-curl switch-libexpat switch-jansson switch-glfw switch-glm switch-libvpx switch-glad
  3. Build by make -j4
  4. Moonlight-Switch.nro should be created. If it doesn't work, try to install missing packages
  5. If it still doesn't work, god bless you!

Switch using Docker:

  1. scripts/build-switch.sh
  2. Find Moonlight-Switch.nro

MacOS (XCode):

  1. Open .xcodeproj
  2. Fix dependency folders if you need inside Project->Moonlight->Search Paths
  3. Run the build
  4. If it doesn't work, try to install missing packages using Homebrew
  5. And again, god bless you!

Linux/Windows/MacOS

  1. Install meson and ninja
  2. Run meson build
  3. Run ninja -C build
  4. Install every dependency which compiler asks and return to 5
  5. Start app with ./build/moonlight