7f7be39230
Deadzone (and future prefs like locale) now live in their own settingsfile_t/settings.c, loaded eagerly at boot and saved immediately on Apply, instead of inside savefile_t - a setting shouldn't reset or diverge just because the player is on a different save slot, and this also fixes settings changes not actually reaching disk until the next full game Save. PSP settings use a new plain sceIo path rather than sceUtilitySavedata, since that dialog would flash its native icon on every settings tweak. GameCube reuses the save system's existing memory card mount rather than mounting it twice (settingsInit() now runs after saveInit()). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
38 lines
875 B
C
38 lines
875 B
C
/**
|
|
* Copyright (c) 2026 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "error/error.h"
|
|
#include "save/settingsfile.h"
|
|
|
|
#define SETTINGS_LINUX_PATH_MAX FILENAME_MAX
|
|
#define SETTINGS_LINUX_FILE_FORMAT "%s/settings.dat"
|
|
|
|
#ifndef SETTINGS_LINUX_PATH
|
|
#define SETTINGS_LINUX_PATH "./saves"
|
|
#endif
|
|
|
|
typedef struct {
|
|
char_t path[SETTINGS_LINUX_PATH_MAX];
|
|
} settingslinux_t;
|
|
|
|
/**
|
|
* Initializes the settings system on Linux - ensures the settings
|
|
* directory exists, independent of whether the game-save system (see
|
|
* savelinux.h) has been initialized.
|
|
*
|
|
* @return An error code if initialization fails.
|
|
*/
|
|
errorret_t settingsInitLinux(void);
|
|
|
|
/**
|
|
* Disposes of the settings system on Linux.
|
|
*
|
|
* @return An error code if disposal fails.
|
|
*/
|
|
errorret_t settingsDisposeLinux(void);
|