From e34d35ea80e46f3e4c87badf9a8aba2267d64a1d Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 23 Jan 2025 13:31:41 -0500 Subject: add print current running game --- src/index.tsx | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/index.tsx b/src/index.tsx index 390454b..288e1e6 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -3,6 +3,7 @@ import { PanelSection, PanelSectionRow, ButtonItem, + Router, } from "@decky/ui"; import { definePlugin, callable } from "@decky/api"; import { FaShip } from "react-icons/fa"; @@ -153,10 +154,33 @@ function FGModInstallerSection() { ); } +function MainRunningApp() { + const mainRunningApp = Router.MainRunningApp; + + return ( + + +
+ {mainRunningApp ? ( + Main Running App: {mainRunningApp.display_name} + ) : ( + No app is currently running. + )} +
+
+
+ ); +} + export default definePlugin(() => ({ name: "Framegen Plugin", titleView:
Framegen Plugin
, - content: , + content: ( + <> + + + + ), icon: , onDismount() { console.log("Framegen Plugin unmounted"); -- cgit v1.2.3