diff --git a/Cargo.lock b/Cargo.lock index a0e25cc..095cf8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -395,9 +395,9 @@ dependencies = [ [[package]] name = "rrplug" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4beccc264275850d6526bc531934bbcb254b2350bb4a5723964ad6d95b4abd" +checksum = "a95b84e776830a5cb6074d943fee2c917882b67cbac6036f2e110126fb7d2689" dependencies = [ "bitflags", "log", @@ -410,9 +410,9 @@ dependencies = [ [[package]] name = "rrplug_proc" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb023a15963bb3d031369610b680dc23c1bac985a3a352cacdd4cb9df9e038d0" +checksum = "b4b6d5c202326f080f0e89ff097656db412fc5aebecb09287a9283199b471f6b" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index b15103a..3594b7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -rrplug = "4.0.0" +rrplug = "=4.1.0" discord-sdk = "0.3.2" tokio = "1.26.0" parking_lot = "0.12.1" diff --git a/src/lib.rs b/src/lib.rs index b0821e2..664cfe6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,8 +2,8 @@ use discord_sdk::activity::Secrets; use parking_lot::Mutex; -use rrplug::interfaces::manager::register_interface; use rrplug::prelude::*; +use rrplug::{bindings::plugin_abi::PluginColor, interfaces::manager::register_interface}; use tokio::runtime::Runtime; use crate::{ @@ -43,11 +43,16 @@ pub struct DiscordRpcPlugin { #[deny(non_snake_case)] impl Plugin for DiscordRpcPlugin { - const PLUGIN_INFO: PluginInfo = PluginInfo::new( + const PLUGIN_INFO: PluginInfo = PluginInfo::new_with_color( c"DISCORDRPC", c"DSCRD-RPC", c"DISCORDRPC", PluginContext::CLIENT, + PluginColor { + red: 114, + green: 137, + blue: 218, + }, ); fn new(_: bool) -> Self { diff --git a/src/presence.rs b/src/presence.rs index cea7f85..ccd4c91 100644 --- a/src/presence.rs +++ b/src/presence.rs @@ -35,6 +35,8 @@ pub fn run_presence_updates(sqvm: NonNull) { }; } +// "Localize_001" is a thing + /// function to pull presence from the sqvm since in runframe it's impossibke to get the output of a function back #[rrplug::sqfunction(VM = "UI | CLIENT", ExportName = "FetchPresence")] pub fn fetch_presence() -> Result<(), String> {