Add: support for user-global configuration.

This commit is contained in:
iceBear67
2026-08-08 14:14:11 +08:00
parent 2f484157e6
commit 4aa578121d
24 changed files with 499 additions and 14 deletions
@@ -26,9 +26,23 @@ public interface GameContext {
*/
Optional<CameraPose> cameraPose();
/** {@code .minecraft/config}, where PhotoSync keeps its settings and upload queue. */
/**
* The game-instance config directory (the {@code config/photosync} folder
* inside the game directory), where PhotoSync historically keeps its
* settings and upload queue. The settings file can be moved to
* {@link #userDataDirectory()} from the settings screen; the upload queue
* always stays here.
*/
Path configDirectory();
/**
* The OS-user-level directory offered as the alternative home for the
* settings file: {@code ~/.config/photosyncmod} on Linux and macOS,
* {@code %APPDATA%\photosyncmod} on Windows. Only used once the player
* chooses it; {@link #configDirectory()} stays the default.
*/
Path userDataDirectory();
/**
* Runs a task on the render thread, or immediately if already on it.
*