forked from eden-emu/eden
User Data Migration from Citron, Sudachi, and Yuzu (#91)
Includes citron, sudachi, yuzu currently broken, because the eden dir is always made early? Signed-off-by: swurl <swurl@swurl.xyz> Reviewed-on: eden-emu/eden#91 Co-authored-by: swurl <swurl@swurl.xyz> Co-committed-by: swurl <swurl@swurl.xyz>
This commit is contained in:
parent
4632ab2912
commit
20cc867c62
62 changed files with 703 additions and 384 deletions
|
@ -57,7 +57,7 @@ u32 CalculateWidth(u32 height, Settings::AspectRatio ratio) {
|
|||
|
||||
void SaveWindowState() {
|
||||
const auto window_state_config_loc =
|
||||
FS::PathToUTF8String(FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "window_state.ini");
|
||||
FS::PathToUTF8String(FS::GetEdenPath(FS::EdenPath::ConfigDir) / "window_state.ini");
|
||||
|
||||
void(FS::CreateParentDir(window_state_config_loc));
|
||||
QSettings config(QString::fromStdString(window_state_config_loc), QSettings::IniFormat);
|
||||
|
@ -73,12 +73,12 @@ void SaveWindowState() {
|
|||
|
||||
void RestoreWindowState(std::unique_ptr<QtConfig>& qtConfig) {
|
||||
const auto window_state_config_loc =
|
||||
FS::PathToUTF8String(FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "window_state.ini");
|
||||
FS::PathToUTF8String(FS::GetEdenPath(FS::EdenPath::ConfigDir) / "window_state.ini");
|
||||
|
||||
// Migrate window state from old location
|
||||
if (!FS::Exists(window_state_config_loc) && qtConfig->Exists("UI", "UILayout\\geometry")) {
|
||||
const auto config_loc =
|
||||
FS::PathToUTF8String(FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "qt-config.ini");
|
||||
FS::PathToUTF8String(FS::GetEdenPath(FS::EdenPath::ConfigDir) / "qt-config.ini");
|
||||
QSettings config(QString::fromStdString(config_loc), QSettings::IniFormat);
|
||||
|
||||
config.beginGroup(QStringLiteral("UI"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue