aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/cloud/onedrive/onedrivestorage.cpp2
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp11
-rw-r--r--backends/saves/default/default-saves.cpp13
3 files changed, 24 insertions, 2 deletions
diff --git a/backends/cloud/onedrive/onedrivestorage.cpp b/backends/cloud/onedrive/onedrivestorage.cpp
index 3ffdcc67f8..8799f3d69f 100644
--- a/backends/cloud/onedrive/onedrivestorage.cpp
+++ b/backends/cloud/onedrive/onedrivestorage.cpp
@@ -196,7 +196,7 @@ void OneDriveStorage::infoInnerCallback(StorageInfoCallback outerCallback, Netwo
Common::JSONObject info = json->asObject();
Common::String uid, name, email;
- uint64 quotaUsed = 0, quotaAllocated = 26843545600L; // 25 GB, because I actually don't know any way to find out the real one
+ uint64 quotaUsed = 0, quotaAllocated = 26843545600LL; // 25 GB, because I actually don't know any way to find out the real one
if (Networking::CurlJsonRequest::jsonContainsObject(info, "createdBy", "OneDriveStorage::infoInnerCallback")) {
Common::JSONObject createdBy = info.getVal("createdBy")->asObject();
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 7ea1860d93..33c82b9fd6 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -348,6 +348,17 @@ void OpenGLSdlGraphicsManager::notifyVideoExpose() {
void OpenGLSdlGraphicsManager::notifyResize(const uint width, const uint height) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
+ // We sometime get outdated resize events from SDL2. So check that the size we get
+ // is the actual current window size. If not ignore the resize.
+ // The issue for example occurs when switching from fullscreen to windowed mode or
+ // when switching between different fullscreen resolutions because SDL_DestroyWindow
+ // for a fullscreen window that doesn't have the SDL_WINDOW_FULLSCREEN_DESKTOP flag
+ // causes a SDL_WINDOWEVENT_RESIZED event with the old resolution to be sent, and this
+ // event is processed after recreating the window at the new resolution.
+ int currentWidth, currentHeight;
+ getWindowDimensions(&currentWidth, &currentHeight);
+ if (width != currentWidth || height != currentHeight)
+ return;
setActualScreenSize(width, height);
_eventSource->resetKeyboadEmulation(width - 1, height - 1);
#else
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index 8a7fba46f7..a958974209 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -181,6 +181,16 @@ bool DefaultSaveFileManager::removeSavefile(const Common::String &filename) {
assureCached(getSavePath());
if (getError().getCode() != Common::kNoError)
return false;
+
+#ifdef USE_LIBCURL
+ // Update file's timestamp
+ Common::HashMap<Common::String, uint32> timestamps = loadTimestamps();
+ Common::HashMap<Common::String, uint32>::iterator it = timestamps.find(filename);
+ if (it != timestamps.end()) {
+ timestamps.erase(it);
+ saveTimestamps(timestamps);
+ }
+#endif
// Obtain node if exists.
SaveFileCache::const_iterator file = _saveFileCache.find(filename);
@@ -330,7 +340,8 @@ Common::HashMap<Common::String, uint32> DefaultSaveFileManager::loadTimestamps()
//parse timestamp
uint32 timestamp = buffer.asUint64();
if (buffer == "" || timestamp == 0) break;
- timestamps[filename] = timestamp;
+ if (timestamps.contains(filename))
+ timestamps[filename] = timestamp;
}
delete file;