1.5: Fuckin' UE5... #38

Manually merged
williamjcm merged 126 commits from one-point-five into master 2024-07-22 11:06:13 +02:00
Showing only changes of commit 9e7547a1cd - Show all commits

View file

@ -49,7 +49,9 @@ SaveTool::handleFileAction(efsw::WatchID watch_id,
return; return;
} // TODO: actually do something when config files will finally be handled } // TODO: actually do something when config files will finally be handled
if(!Utility::String::endsWith(filename, Utility::format("Profile{}.sav", _currentProfile->account()).data())) { if(!Utility::String::endsWith(filename, Utility::format("Profile{}.sav", _currentProfile->account()).data()) &&
filename.find("Unit") == std::string::npos)
{
return; return;
} }
@ -83,7 +85,8 @@ SaveTool::fileUpdateEvent(SDL_Event& event) {
} }
if(event.user.code == FileMoved) { if(event.user.code == FileMoved) {
old_filename = Containers::String{static_cast<char*>(event.user.data2), std::strlen(static_cast<char*>(event.user.data2)), nullptr}; old_filename = Containers::String{static_cast<char*>(event.user.data2),
std::strlen(static_cast<char*>(event.user.data2)), nullptr};
old_index = ((old_filename[_currentProfile->isDemo() ? 8 : 4] - 0x30) * 10) + old_index = ((old_filename[_currentProfile->isDemo() ? 8 : 4] - 0x30) * 10) +
(old_filename[_currentProfile->isDemo() ? 9 : 5] - 0x30); (old_filename[_currentProfile->isDemo() ? 9 : 5] - 0x30);
} }
@ -125,8 +128,8 @@ SaveTool::fileUpdateEvent(SDL_Event& event) {
} }
else { else {
if(_modifiedBySaveTool && _currentMass->filename() == filename) { if(_modifiedBySaveTool && _currentMass->filename() == filename) {
auto handle = CreateFileW(Utility::Unicode::widen(Containers::StringView{filename}), GENERIC_READ, 0, auto handle = CreateFileW(Utility::Unicode::widen(Containers::StringView{filename}),
nullptr, OPEN_EXISTING, 0, nullptr); GENERIC_READ, 0, nullptr, OPEN_EXISTING, 0, nullptr);
if(handle && handle != INVALID_HANDLE_VALUE) { if(handle && handle != INVALID_HANDLE_VALUE) {
CloseHandle(handle); CloseHandle(handle);
_modifiedBySaveTool = false; _modifiedBySaveTool = false;