|
|
@ -14,7 +14,7 @@
|
|
|
|
#include <components/loadinglistener/loadinglistener.hpp>
|
|
|
|
#include <components/loadinglistener/loadinglistener.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
#include <components/files/conversion.hpp>
|
|
|
|
#include <components/files/conversion.hpp>
|
|
|
|
#include <components/settings/settings.hpp>
|
|
|
|
#include <components/settings/values.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
#include <osg/Image>
|
|
|
|
#include <osg/Image>
|
|
|
|
|
|
|
|
|
|
|
@ -314,8 +314,7 @@ void MWState::StateManager::saveGame(std::string_view description, const Slot* s
|
|
|
|
if (filestream.fail())
|
|
|
|
if (filestream.fail())
|
|
|
|
throw std::runtime_error("Write operation failed (file stream)");
|
|
|
|
throw std::runtime_error("Write operation failed (file stream)");
|
|
|
|
|
|
|
|
|
|
|
|
Settings::Manager::setString(
|
|
|
|
Settings::saves().mCharacter.set(Files::pathToUnicodeString(slot->mPath.parent_path().filename()));
|
|
|
|
"character", "Saves", Files::pathToUnicodeString(slot->mPath.parent_path().filename()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto finish = std::chrono::steady_clock::now();
|
|
|
|
const auto finish = std::chrono::steady_clock::now();
|
|
|
|
|
|
|
|
|
|
|
@ -354,12 +353,8 @@ void MWState::StateManager::quickSave(std::string name)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int maxSaves = Settings::Manager::getInt("max quicksaves", "Saves");
|
|
|
|
|
|
|
|
if (maxSaves < 1)
|
|
|
|
|
|
|
|
maxSaves = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Character* currentCharacter = getCurrentCharacter(); // Get current character
|
|
|
|
Character* currentCharacter = getCurrentCharacter(); // Get current character
|
|
|
|
QuickSaveManager saveFinder = QuickSaveManager(name, maxSaves);
|
|
|
|
QuickSaveManager saveFinder(name, Settings::saves().mMaxQuicksaves);
|
|
|
|
|
|
|
|
|
|
|
|
if (currentCharacter)
|
|
|
|
if (currentCharacter)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -542,8 +537,7 @@ void MWState::StateManager::loadGame(const Character* character, const std::file
|
|
|
|
mState = State_Running;
|
|
|
|
mState = State_Running;
|
|
|
|
|
|
|
|
|
|
|
|
if (character)
|
|
|
|
if (character)
|
|
|
|
Settings::Manager::setString(
|
|
|
|
Settings::saves().mCharacter.set(Files::pathToUnicodeString(character->getPath().filename()));
|
|
|
|
"character", "Saves", Files::pathToUnicodeString(character->getPath().filename()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->setNewGame(false);
|
|
|
|
MWBase::Environment::get().getWindowManager()->setNewGame(false);
|
|
|
|
MWBase::Environment::get().getWorld()->saveLoaded();
|
|
|
|
MWBase::Environment::get().getWorld()->saveLoaded();
|
|
|
|