diff options
| author | xXJsonDeruloXx <danielhimebauch@gmail.com> | 2026-03-21 08:27:00 -0400 |
|---|---|---|
| committer | xXJsonDeruloXx <danielhimebauch@gmail.com> | 2026-03-21 08:27:00 -0400 |
| commit | 5bed3355d1014fcf874a34695d113275cbebe9d2 (patch) | |
| tree | a81896771a5795ea43545084628f8fc146bbf6bc /src | |
| parent | 80e8abebe227f4d1c265035cfea68e29400fab3f (diff) | |
| download | Decky-Framegen-5bed3355d1014fcf874a34695d113275cbebe9d2.tar.gz Decky-Framegen-5bed3355d1014fcf874a34695d113275cbebe9d2.zip | |
Parse full OptiScaler config schema
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/index.ts | 2 | ||||
| -rw-r--r-- | src/types/index.ts | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/api/index.ts b/src/api/index.ts index 2e275d2..ea0d28c 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -18,7 +18,7 @@ export const getGameConfig = callable<[string], GameConfigResponse>("get_game_co export const saveGameConfig = callable< [string, Record<string, string>, string | null, boolean, string | null], - ApiResponse + GameConfigResponse >("save_game_config"); export const logError = callable<[string], void>("log_error"); diff --git a/src/types/index.ts b/src/types/index.ts index 73e7947..e9424c1 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -21,11 +21,40 @@ export interface GameConfigPaths { live_ini: string; } +export interface GameConfigOption { + value: string; + label: string; +} + +export interface GameConfigSettingSchema { + id: string; + section: string; + key: string; + label: string; + description: string; + default: string; + control: "dropdown" | "range" | "number" | "text"; + options: GameConfigOption[]; + rangeMin?: number | null; + rangeMax?: number | null; + step?: number; + numericType?: "int" | "float"; + isPath?: boolean; + isKeycode?: boolean; +} + +export interface GameConfigSectionSchema { + id: string; + label: string; + settings: GameConfigSettingSchema[]; +} + export interface GameConfigResponse extends ApiResponse { appid?: string; name?: string; proxy?: string; settings?: Record<string, string>; + schema?: GameConfigSectionSchema[]; raw_ini?: string; managed_exists?: boolean; live_available?: boolean; |
