From e34d35ea80e46f3e4c87badf9a8aba2267d64a1d Mon Sep 17 00:00:00 2001
From: xXJSONDeruloXx <danielhimebauch@gmail.com>
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/index.tsx')

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 (
+    <PanelSection title="Main Running App">
+      <PanelSectionRow>
+        <div>
+          {mainRunningApp ? (
+            <span>Main Running App: {mainRunningApp.display_name}</span>
+          ) : (
+            <span>No app is currently running.</span>
+          )}
+        </div>
+      </PanelSectionRow>
+    </PanelSection>
+  );
+}
+
 export default definePlugin(() => ({
   name: "Framegen Plugin",
   titleView: <div>Framegen Plugin</div>,
-  content: <MainContent />,
+  content: (
+    <>
+      <MainContent />
+      <MainRunningApp />
+    </>
+  ),
   icon: <FaShip />,
   onDismount() {
     console.log("Framegen Plugin unmounted");
-- 
cgit v1.2.3

