Separate Updates from Game Folder (#1026)

* separate updates implementation

* clang format

clang format

clang format

clang format

clang hates me

work please

* hotfix: check for sfo file instead of the folder

* tiny change

* refactor

* forgot to change this over

* add review changes

* use operator
This commit is contained in:
ElBread3 2024-10-15 10:49:42 -05:00 committed by GitHub
parent 29ad2eca62
commit a588bc5da8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 135 additions and 12 deletions

View file

@ -60,6 +60,7 @@ static bool vkMarkers = false;
static bool vkCrashDiagnostic = false;
static s16 cursorState = HideCursorState::Idle;
static int cursorHideTimeout = 5; // 5 seconds (default)
static bool separateupdatefolder = false;
// Gui
std::vector<std::filesystem::path> settings_install_dirs = {};
@ -207,6 +208,10 @@ bool vkCrashDiagnosticEnabled() {
return vkCrashDiagnostic;
}
bool getSeparateUpdateEnabled() {
return separateupdatefolder;
}
void setGpuId(s32 selectedGpuId) {
gpuId = selectedGpuId;
}
@ -319,6 +324,10 @@ void setSpecialPadClass(int type) {
specialPadClass = type;
}
void setSeparateUpdateEnabled(bool use) {
separateupdatefolder = use;
}
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h) {
main_window_geometry_x = x;
main_window_geometry_y = y;
@ -483,6 +492,7 @@ void load(const std::filesystem::path& path) {
}
isShowSplash = toml::find_or<bool>(general, "showSplash", true);
isAutoUpdate = toml::find_or<bool>(general, "autoUpdate", false);
separateupdatefolder = toml::find_or<bool>(general, "separateUpdateEnabled", false);
}
if (data.contains("Input")) {
@ -597,6 +607,7 @@ void save(const std::filesystem::path& path) {
data["General"]["updateChannel"] = updateChannel;
data["General"]["showSplash"] = isShowSplash;
data["General"]["autoUpdate"] = isAutoUpdate;
data["General"]["separateUpdateEnabled"] = separateupdatefolder;
data["Input"]["cursorState"] = cursorState;
data["Input"]["cursorHideTimeout"] = cursorHideTimeout;
data["Input"]["backButtonBehavior"] = backButtonBehavior;

View file

@ -19,6 +19,7 @@ bool isFullscreenMode();
bool getPlayBGM();
int getBGMvolume();
bool getEnableDiscordRPC();
bool getSeparateUpdateEnabled();
std::string getLogFilter();
std::string getLogType();
@ -62,6 +63,7 @@ void setLanguage(u32 language);
void setNeoMode(bool enable);
void setUserName(const std::string& type);
void setUpdateChannel(const std::string& type);
void setSeparateUpdateEnabled(bool use);
void setCursorState(s16 cursorState);
void setCursorHideTimeout(int newcursorHideTimeout);