From 6b701637ad308513b678c80baceec6c79e339ce9 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 17 Jul 2025 14:22:56 -0400 Subject: initial conf FE and BE hooks --- src/config/configSchema.ts | 83 +++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 52 deletions(-) (limited to 'src/config/configSchema.ts') diff --git a/src/config/configSchema.ts b/src/config/configSchema.ts index 6956030..83dc4aa 100644 --- a/src/config/configSchema.ts +++ b/src/config/configSchema.ts @@ -9,95 +9,72 @@ export enum ConfigFieldType { BOOLEAN = "boolean", INTEGER = "integer", - FLOAT = "float" + FLOAT = "float", + STRING = "string" } // Configuration field definition export interface ConfigField { name: string; fieldType: ConfigFieldType; - default: boolean | number; + default: boolean | number | string; description: string; - scriptTemplate: string; - scriptComment?: string; } // Configuration schema - must match Python CONFIG_SCHEMA export const CONFIG_SCHEMA: Record = { - enable_lsfg: { - name: "enable_lsfg", + enable: { + name: "enable", fieldType: ConfigFieldType.BOOLEAN, default: true, - description: "Enables the frame generation layer", - scriptTemplate: "export ENABLE_LSFG={value}", - scriptComment: "# export ENABLE_LSFG=1" + description: "enable/disable lsfg on every game" + }, + + dll: { + name: "dll", + fieldType: ConfigFieldType.STRING, + default: "/games/Lossless Scaling/Lossless.dll", + description: "specify where Lossless.dll is stored" }, multiplier: { name: "multiplier", fieldType: ConfigFieldType.INTEGER, default: 2, - description: "Traditional FPS multiplier value", - scriptTemplate: "export LSFG_MULTIPLIER={value}" + description: "change the fps multiplier" }, flow_scale: { name: "flow_scale", fieldType: ConfigFieldType.FLOAT, default: 0.8, - description: "Lowers the internal motion estimation resolution", - scriptTemplate: "export LSFG_FLOW_SCALE={value}" - }, - - hdr: { - name: "hdr", - fieldType: ConfigFieldType.BOOLEAN, - default: false, - description: "Enable HDR mode (only if Game supports HDR)", - scriptTemplate: "export LSFG_HDR={value}", - scriptComment: "# export LSFG_HDR=1" + description: "change the flow scale (lower = faster)" }, - perf_mode: { - name: "perf_mode", + performance_mode: { + name: "performance_mode", fieldType: ConfigFieldType.BOOLEAN, default: true, - description: "Use lighter model for FG", - scriptTemplate: "export LSFG_PERF_MODE={value}", - scriptComment: "# export LSFG_PERF_MODE=1" + description: "toggle performance mode (2x-8x performance increase)" }, - immediate_mode: { - name: "immediate_mode", + hdr_mode: { + name: "hdr_mode", fieldType: ConfigFieldType.BOOLEAN, default: false, - description: "Reduce input lag (Experimental, will cause issues in many games)", - scriptTemplate: "export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync", - scriptComment: "# export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync" - }, - - disable_vkbasalt: { - name: "disable_vkbasalt", - fieldType: ConfigFieldType.BOOLEAN, - default: true, - description: "Some plugins add vkbasalt layer, which can break lsfg. Toggling on fixes this", - scriptTemplate: "export DISABLE_VKBASALT={value}", - scriptComment: "# export DISABLE_VKBASALT=1" - }, - - frame_cap: { - name: "frame_cap", - fieldType: ConfigFieldType.INTEGER, - default: 0, - description: "Limit base game FPS (0 = disabled)", - scriptTemplate: "export DXVK_FRAME_RATE={value}", - scriptComment: "# export DXVK_FRAME_RATE=60" + description: "enable hdr mode (doesn't support scrgb)" } }; // Type-safe configuration data structure export interface ConfigurationData { - enable_lsfg: boolean; + enable: boolean; + dll: string; + multiplier: number; + flow_scale: number; + performance_mode: boolean; + hdr_mode: boolean; +} multiplier: number; flow_scale: number; hdr: boolean; @@ -140,7 +117,7 @@ export class ConfigurationManager { /** * Create ordered arguments array from configuration object */ - static createArgsFromConfig(config: ConfigurationData): (boolean | number)[] { + static createArgsFromConfig(config: ConfigurationData): (boolean | number | string)[] { return this.getFieldNames().map(fieldName => config[fieldName as keyof ConfigurationData] ); @@ -163,6 +140,8 @@ export class ConfigurationManager { (validated as any)[fieldName] = parseInt(String(value), 10); } else if (fieldDef.fieldType === ConfigFieldType.FLOAT) { (validated as any)[fieldName] = parseFloat(String(value)); + } else if (fieldDef.fieldType === ConfigFieldType.STRING) { + (validated as any)[fieldName] = String(value); } } }); -- cgit v1.2.3 From ad0ba0fc61f83e2aaf22192e7d0ad05dde9ffd62 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 17 Jul 2025 14:53:18 -0400 Subject: fix descriptions and cleanup UI --- src/config/configSchema.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/config/configSchema.ts') diff --git a/src/config/configSchema.ts b/src/config/configSchema.ts index 83dc4aa..6dc8687 100644 --- a/src/config/configSchema.ts +++ b/src/config/configSchema.ts @@ -48,21 +48,21 @@ export const CONFIG_SCHEMA: Record = { name: "flow_scale", fieldType: ConfigFieldType.FLOAT, default: 0.8, - description: "change the flow scale (lower = faster)" + description: "change the flow scale" }, performance_mode: { name: "performance_mode", fieldType: ConfigFieldType.BOOLEAN, default: true, - description: "toggle performance mode (2x-8x performance increase)" + description: "toggle performance mode" }, hdr_mode: { name: "hdr_mode", fieldType: ConfigFieldType.BOOLEAN, default: false, - description: "enable hdr mode (doesn't support scrgb)" + description: "enable hdr in games that support it" } }; @@ -75,14 +75,6 @@ export interface ConfigurationData { performance_mode: boolean; hdr_mode: boolean; } - multiplier: number; - flow_scale: number; - hdr: boolean; - perf_mode: boolean; - immediate_mode: boolean; - disable_vkbasalt: boolean; - frame_cap: number; -} // Centralized configuration manager export class ConfigurationManager { -- cgit v1.2.3 From 0670041467ca5625d93e3e4dbc2f738da24d88b4 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 17 Jul 2025 23:23:03 -0400 Subject: add experimental toggles --- src/config/configSchema.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/config/configSchema.ts') diff --git a/src/config/configSchema.ts b/src/config/configSchema.ts index 6dc8687..9b6fc41 100644 --- a/src/config/configSchema.ts +++ b/src/config/configSchema.ts @@ -63,6 +63,20 @@ export const CONFIG_SCHEMA: Record = { fieldType: ConfigFieldType.BOOLEAN, default: false, description: "enable hdr in games that support it" + }, + + experimental_present_mode: { + name: "experimental_present_mode", + fieldType: ConfigFieldType.STRING, + default: "", + description: "experimental: override vulkan present mode (empty/fifo/vsync/mailbox/immediate)" + }, + + experimental_fps_limit: { + name: "experimental_fps_limit", + fieldType: ConfigFieldType.INTEGER, + default: 0, + description: "experimental: base framerate cap for dxvk games, before frame multiplier (0 = disabled)" } }; @@ -74,6 +88,8 @@ export interface ConfigurationData { flow_scale: number; performance_mode: boolean; hdr_mode: boolean; + experimental_present_mode: string; + experimental_fps_limit: number; } // Centralized configuration manager -- cgit v1.2.3