summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxXJsonDeruloXx <danielhimebauch@gmail.com>2026-03-21 07:57:48 -0400
committerxXJsonDeruloXx <danielhimebauch@gmail.com>2026-03-21 07:57:48 -0400
commit2668d9649bf36d1e279470f81918464dd30f5e3d (patch)
tree8fcdd23a0f2485bb109467bce6608955932c3d1c /src
parentd81bb130385114389728f849d0ab8cccf62b90d1 (diff)
downloadDecky-Framegen-2668d9649bf36d1e279470f81918464dd30f5e3d.tar.gz
Decky-Framegen-2668d9649bf36d1e279470f81918464dd30f5e3d.zip
Add per-game config APIs and proxy persistence
Diffstat (limited to 'src')
-rw-r--r--src/api/index.ts38
-rw-r--r--src/types/index.ts21
2 files changed, 35 insertions, 24 deletions
diff --git a/src/api/index.ts b/src/api/index.ts
index f2e0ea1..2e275d2 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -1,29 +1,25 @@
import { callable } from "@decky/api";
+import type { ApiResponse, GameConfigResponse } from "../types/index";
-export const runInstallFGMod = callable<
- [],
- { status: string; message?: string; output?: string }
->("run_install_fgmod");
+export const runInstallFGMod = callable<[], ApiResponse>("run_install_fgmod");
-export const runUninstallFGMod = callable<
- [],
- { status: string; message?: string; output?: string }
->("run_uninstall_fgmod");
+export const runUninstallFGMod = callable<[], ApiResponse>("run_uninstall_fgmod");
-export const checkFGModPath = callable<
- [],
- { exists: boolean }
->("check_fgmod_path");
+export const checkFGModPath = callable<[], { exists: boolean }>("check_fgmod_path");
export const listInstalledGames = callable<
[],
{ status: string; games: { appid: string; name: string }[] }
>("list_installed_games");
-export const cleanupManagedGame = callable<
- [string],
- { status: string; message?: string; output?: string }
->("cleanup_managed_game");
+export const cleanupManagedGame = callable<[string], ApiResponse>("cleanup_managed_game");
+
+export const getGameConfig = callable<[string], GameConfigResponse>("get_game_config");
+
+export const saveGameConfig = callable<
+ [string, Record<string, string>, string | null, boolean, string | null],
+ ApiResponse
+>("save_game_config");
export const logError = callable<[string], void>("log_error");
@@ -32,12 +28,6 @@ export const getPathDefaults = callable<
{ home: string; steam_common?: string }
>("get_path_defaults");
-export const runManualPatch = callable<
- [string],
- { status: string; message?: string; output?: string }
->("manual_patch_directory");
+export const runManualPatch = callable<[string], ApiResponse>("manual_patch_directory");
-export const runManualUnpatch = callable<
- [string],
- { status: string; message?: string; output?: string }
->("manual_unpatch_directory");
+export const runManualUnpatch = callable<[string], ApiResponse>("manual_unpatch_directory");
diff --git a/src/types/index.ts b/src/types/index.ts
index c810754..73e7947 100644
--- a/src/types/index.ts
+++ b/src/types/index.ts
@@ -4,6 +4,8 @@ export interface ApiResponse {
status: string;
message?: string;
output?: string;
+ live_applied?: boolean;
+ proxy?: string;
}
export interface GameInfo {
@@ -11,6 +13,25 @@ export interface GameInfo {
name: string;
}
+export interface GameConfigPaths {
+ compatdata: string;
+ managed_root: string;
+ managed_ini: string;
+ system32: string;
+ live_ini: string;
+}
+
+export interface GameConfigResponse extends ApiResponse {
+ appid?: string;
+ name?: string;
+ proxy?: string;
+ settings?: Record<string, string>;
+ raw_ini?: string;
+ managed_exists?: boolean;
+ live_available?: boolean;
+ paths?: GameConfigPaths;
+}
+
export interface LaunchOptions {
command: string;
arguments?: string[];