feat(linux): add graphical platform services

This commit is contained in:
Erik 2026-07-27 11:54:59 +02:00
parent 1628d9f587
commit 66f114b258
28 changed files with 1328 additions and 155 deletions

View file

@ -18,7 +18,7 @@ namespace AcDream.UI.Abstractions.Input;
/// K.1c: <see cref="RetailDefaults"/> now returns the full retail-faithful
/// preset (byte-precise to <c>retail-default.keymap.txt</c>);
/// <see cref="LoadOrDefault"/> + <see cref="SaveToFile"/> persist the
/// table to JSON under <see cref="DefaultPath"/> with version-based
/// table to JSON at a host-provided portable path with version-based
/// migration. <see cref="AcdreamCurrentDefaults"/> is preserved as a
/// reference for tests pinning the older WASD-only behavior, but is no
/// longer the GameWindow startup source.
@ -596,11 +596,4 @@ public sealed class KeyBindings
return result;
}
/// <summary>
/// Default path: <c>%LOCALAPPDATA%\acdream\keybinds.json</c>.
/// </summary>
public static string DefaultPath() => Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"acdream",
"keybinds.json");
}

View file

@ -13,7 +13,8 @@ public readonly record struct UiWindowPosition(float X, float Y);
/// <summary>
/// JSON-backed persistence for non-keybind settings (Display today; future
/// tabs Audio / Gameplay / Chat / Character will be added to the same
/// file). Path: <c>%LOCALAPPDATA%\acdream\settings.json</c>. Coexists
/// file). The graphical host supplies a canonical portable configuration
/// path. Coexists
/// with <c>keybinds.json</c>, which retains its own
/// <see cref="Input.KeyBindings.LoadOrDefault"/> path.
///
@ -41,12 +42,6 @@ public sealed class SettingsStore
_path = path ?? throw new ArgumentNullException(nameof(path));
}
/// <summary>Default path: <c>%LOCALAPPDATA%\acdream\settings.json</c>.</summary>
public static string DefaultPath() => Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"acdream",
"settings.json");
/// <summary>
/// Load Display settings. Missing file → <see cref="DisplaySettings.Default"/>.
/// Missing individual keys fall back to the corresponding default