Skip to content

Commit

Permalink
Android: Save configs also in internal storage for redoundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Apr 8, 2023
1 parent d807f6b commit 280bb51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gframe/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2609,6 +2609,12 @@ void Game::SaveConfig() {
gGameConfig->useIntegratedGpu = gSettings.chkIntegratedGPU->isChecked();
#endif
gGameConfig->driver_type = static_cast<irr::video::E_DRIVER_TYPE>(gSettings.cbVideoDriver->getItemData(gSettings.cbVideoDriver->getSelected()));
#ifdef __ANDROID__
if(gGameConfig->Save(epro::format("{}/system.conf", porting::internal_storage))) {
Utils::FileCopy(epro::format("{}/system.conf", porting::internal_storage), EPRO_TEXT("./config/system.conf"));
return;
}
#endif
gGameConfig->Save(EPRO_TEXT("./config/system.conf"));
}
Game::RepoGui* Game::AddGithubRepositoryStatusWindow(const GitRepo* repo) {
Expand Down
4 changes: 4 additions & 0 deletions gframe/game_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "game_config.h"
#include <fmt/format.h>
#include "bufferio.h"
#include "porting.h"
#include "utils.h"
#include "config.h"
#include "logging.h"
Expand All @@ -11,6 +12,9 @@
namespace ygo {

GameConfig::GameConfig() {
#ifdef __ANDROID__
Load(epro::format("{}/system.conf", porting::internal_storage));
#endif
Load(EPRO_TEXT("./config/system.conf"));
if(configs.empty()) {
{
Expand Down

0 comments on commit 280bb51

Please sign in to comment.