From ba2bc60043c8a1bbc651ca237783ef5e6883bda0 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Sun, 11 Aug 2019 20:44:15 +0100 Subject: BACKENDS: Use the default save file manager on Switch and SamsungTV --- backends/platform/samsungtv/samsungtv.cpp | 5 +++++ backends/platform/sdl/switch/switch.cpp | 2 +- backends/saves/posix/posix-saves.cpp | 7 ------- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/backends/platform/samsungtv/samsungtv.cpp b/backends/platform/samsungtv/samsungtv.cpp index e72b1ee05d..54c2d5fa48 100644 --- a/backends/platform/samsungtv/samsungtv.cpp +++ b/backends/platform/samsungtv/samsungtv.cpp @@ -35,6 +35,11 @@ OSystem_SDL_SamsungTV::OSystem_SDL_SamsungTV() } void OSystem_SDL_SamsungTV::initBackend() { + // Create the savefile manager + if (_savefileManager == 0) { + _savefileManager = new DefaultSaveFileManager("/mtd_wiselink/scummvm savegames"); + } + // Create the events manager if (_eventSource == 0) _eventSource = new SamsungTVSdlEventSource(); diff --git a/backends/platform/sdl/switch/switch.cpp b/backends/platform/sdl/switch/switch.cpp index 85e7b7a458..ab8427cf62 100644 --- a/backends/platform/sdl/switch/switch.cpp +++ b/backends/platform/sdl/switch/switch.cpp @@ -77,7 +77,7 @@ void OSystem_Switch::initBackend() { // Create the savefile manager if (_savefileManager == 0) { - _savefileManager = new POSIXSaveFileManager(); + _savefileManager = new DefaultSaveFileManager("./saves"); } // Event source diff --git a/backends/saves/posix/posix-saves.cpp b/backends/saves/posix/posix-saves.cpp index 045ccb08ba..0863e4400b 100644 --- a/backends/saves/posix/posix-saves.cpp +++ b/backends/saves/posix/posix-saves.cpp @@ -42,12 +42,6 @@ POSIXSaveFileManager::POSIXSaveFileManager() { // Register default savepath. -#if defined(SAMSUNGTV) - ConfMan.registerDefault("savepath", "/mtd_wiselink/scummvm savegames"); -#elif defined(NINTENDO_SWITCH) - Posix::assureDirectoryExists("./saves", nullptr); - ConfMan.registerDefault("savepath", "./saves"); -#else Common::String savePath; #if defined(MACOSX) @@ -127,7 +121,6 @@ POSIXSaveFileManager::POSIXSaveFileManager() { } } } -#endif } #endif -- cgit v1.2.3