Code Monkey home page Code Monkey logo

switchpresence's Introduction

Warning: This Project is very outdated and no longer maintained! Please use this instead: https://github.com/SunTheCourier/SwitchPresence-Rewritten


SwitchPresence

A Nintendo Switch custom sysmodule for Discord Rich Presence.



Usage

  • Copy switch-rich-presence.kip to your sd card and edit the hekate_ipl.ini to include the sysmodule.
    (You can for example add a configuration like this.)
[Discord Rich Presence]
kip1=switch-rich-presence.kip
  • Boot your switch into RCM mode and run hekate on it.
  • Launch your hekate configuration with rich presence and wait until your switch turns on completely. (Also make sure that your switch is connected to internet.)
  • Open the client (SwitchRichPresence.exe) and click the "Connect" button.
  • Done!

Setup a Rich presence app

Note : I already made a default application with some games on it but if you don't do this, most of your icons won't show on discord.

  • Go to this link.
  • Create a new App and give it the name that will be shown on your profile (usually "Nintendo Switch").
  • Enable Rich Presence for you app.
  • Launch the sysmodule and connect the client to the switch (see Usage).
  • Once connected, click on Utils->Export icons and choose the path where your icons will be exported with the right name/icon size.
  • Go to your rich presence app and add all the icons that you just exported with the name they were given and choose the the type "Large".

  • (optional) add a "Small" asset named "icon". This will used as the small image on your profile. (You can use this one.)
  • Open the config.txt file at the root of the client (If this file doesn't exit, running the client once closing it will create a new one.) and edit the client_id line with the client ID of the rich presence app you just created.

Known issues

  • The switch might hang on when getting into sleep mode or when turning it off. If that happens, hard shutdown your switch by pressing the POWER button for ~15 seconds.

Other

Again, huge thanks to everyone who contributed to the amazing documentation on SwitchBrew.

If you have any question/problem, please contact me on discord : random#6457

switchpresence's People

Contributors

gabehxd avatar random06457 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

switchpresence's Issues

client support for macOS / linux

Would it be possible for you to add support for macOS / linux for the client? I tried it out and everything works great in Windows, but 90% of the time I'm using my Mac or linux so it would be real nice if there was support.

Crashes with latest version included in tumGER's SDFiles

Running the CFW + SwitchPresence option from tumGER's latest SDFiles (v8 - Moon Theme) produces the following after clicking connect:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Exception: Error while receiving data !
   at SwitchRichPresence.TcpCommand.ReceiveConfirm(Socket client)
   at SwitchRichPresence.TitleInfo.GetControlData()
   at SwitchRichPresence.SwitchApps.GetApplicationList()
   at SwitchRichPresence.SwitchApps..ctor(String ip)
   at SwitchRichPresence.MainForm.button_connect_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3132.0 built by: NET472REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
SwitchRichPresence
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/UserFiles/Nintendo/Switch/SwitchPresence-client/SwitchRichPresence.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3056.0 built by: NET472REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3151.0 built by: NET472REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3056.0 built by: NET472REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3056.0 built by: NET472REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3160.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3056.0 built by: NET472REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Idea: 1.) Make a Auto-Startup or Background process option. 2.) Auto activate thing. 3.) Add an argument option for powershell/cmd.

1.) How about a possibility to run the client in the Windows system tray so that you don't have to keep the window open all the time if you want to use the RPC (Rich Presence). You could also add the option for the client to start automatically at Windows start-up. 2.) How about a function that permanently pings the switch to see whether it is online. If it is, the RPC will come on, and if it is not, the RPC will go out. 3.) How about that when you run the exe file via Powershell or CMD, there are arguments that you can use like this: ./SwitchRichPresence.exe -h -i

I would be happy if my suggestions are implemented. I think that would evaluate the whole system a little more. :)

"Failed to launch firmware"

While using the latest release of Hekate and AMS, I can't seem to launch with SwitchPresence ebabled, getting the above mentioned error. Talked about it with Random and leaving it here for documentation purposes.

Different client id's for different games

Is there a way you could implement this? I really don't like how it can only use one, leaving it at "Nintendo Switch" as the game name. I'd rather have it say "Mario Kart 8 Deluxe" Or "BOTW" or something when playing that respective game.

make a new release

it has been 4 months since you last committed to this and the latest release says Sep 2 · 12 commits to master since this release.

Concerning sys-ftpd and layeredFS

Since the readme states not confirmed yet I would like to share some of my own results. These are based on using tumGER's Latest SD Files Hekate configurations.

  • FTP + CFW (no LayeredFS) => Adding SwitchPresence works
  • LayeredFS (no FTP) => Stuck on Nintendo Switch boot logo
  • FTP + LayeredFS => Stuck on Nintendo Switch boot logo

TL;DR: Works with Sys-FTPD, doesn't work with LayeredFS

Crash on sleep

Switch (7.0.1) crashes with atmosphere (0.8.9) if its on sleep mode.

Bad definition of Module_Discord

Hey, it looks like you defined Module_Discord = 789 -- the maximum module ID for switch error codes is 511 (because the field gets encoded in 9 bits).

This leads to truncation of your error codes/loss of information/corruption of the description field.

I would recommend choosing a module with a lower number :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.