[Scummvm-git-logs] scummvm branch-2-9 -> 6f2bef94fa912af0bfc3075997a3de5753c07ca0
ccawley2011
noreply at scummvm.org
Wed Dec 4 22:45:17 UTC 2024
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5a8dd9d59c QDENGINE: Avoid stack overflow with the 3DS port
18a861f581 COMMON: Fix uninitialised variable in Path::punycodeNeedsEncode()
6f2bef94fa RISCOS: Don't encode path when it's not needed
Commit: 5a8dd9d59cc8ed2ec17c7fb6417bb3420480cc45
https://github.com/scummvm/scummvm/commit/5a8dd9d59cc8ed2ec17c7fb6417bb3420480cc45
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-12-04T22:44:44Z
Commit Message:
QDENGINE: Avoid stack overflow with the 3DS port
Changed paths:
engines/qdengine/qdcore/util/splash_screen.cpp
diff --git a/engines/qdengine/qdcore/util/splash_screen.cpp b/engines/qdengine/qdcore/util/splash_screen.cpp
index b00ec209331..8400e12287e 100644
--- a/engines/qdengine/qdcore/util/splash_screen.cpp
+++ b/engines/qdengine/qdcore/util/splash_screen.cpp
@@ -38,12 +38,12 @@ namespace QDEngine {
bool SplashScreen::create(int bitmapResID) {
if (!create_window()) return false;
- Common::PEResources r;
+ Common::ScopedPtr<Common::PEResources> r(new Common::PEResources());
Common::WinResourceID resid(bitmapResID);
Image::BitmapDecoder decoder;
- if (r.loadFromEXE(g_engine->getExeName())) {
- Common::SeekableReadStream *stream = r.getResource(Common::kWinBitmap, resid);
+ if (r->loadFromEXE(g_engine->getExeName())) {
+ Common::SeekableReadStream *stream = r->getResource(Common::kWinBitmap, resid);
if (stream && decoder.loadStream(*stream)) {
_splash = new Graphics::Surface();
_splash->copyFrom(*decoder.getSurface());
Commit: 18a861f581f3218a50cc0a39cff3e57ab41848a0
https://github.com/scummvm/scummvm/commit/18a861f581f3218a50cc0a39cff3e57ab41848a0
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-12-04T22:44:58Z
Commit Message:
COMMON: Fix uninitialised variable in Path::punycodeNeedsEncode()
Changed paths:
common/path.cpp
diff --git a/common/path.cpp b/common/path.cpp
index 3acdfaf2147..4c854090484 100644
--- a/common/path.cpp
+++ b/common/path.cpp
@@ -1026,7 +1026,7 @@ Path Path::punycodeEncode() const {
}
bool Path::punycodeNeedsEncode() const {
- bool tmp;
+ bool tmp = false;
return reduceComponents<bool &>(
[](bool &result, const String &in, bool last) -> bool & {
// If we already need encode, we still need it
Commit: 6f2bef94fa912af0bfc3075997a3de5753c07ca0
https://github.com/scummvm/scummvm/commit/6f2bef94fa912af0bfc3075997a3de5753c07ca0
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-12-04T22:45:08Z
Commit Message:
RISCOS: Don't encode path when it's not needed
Also disable atomic support as it may fail to write when file names are
long.
Changed paths:
backends/fs/stdiostream.cpp
common/path.cpp
diff --git a/backends/fs/stdiostream.cpp b/backends/fs/stdiostream.cpp
index cc03e78321c..db2cb7bd60b 100644
--- a/backends/fs/stdiostream.cpp
+++ b/backends/fs/stdiostream.cpp
@@ -43,6 +43,10 @@
// Atari file names must have a 8.3 format, atomic breaks this
#define STDIOSTREAM_NO_ATOMIC_SUPPORT
#endif
+#if defined(RISCOS)
+// RISC OS file names are expected to be 10 characters or less, atomic makes this hard to guarantee
+#define STDIOSTREAM_NO_ATOMIC_SUPPORT
+#endif
StdioStream::StdioStream(void *handle) : _handle(handle), _path(nullptr) {
assert(handle);
diff --git a/common/path.cpp b/common/path.cpp
index 4c854090484..b19b288dc1a 100644
--- a/common/path.cpp
+++ b/common/path.cpp
@@ -1177,13 +1177,21 @@ String Path::toConfig() const {
return toString(Path::kNativeSeparator);
}
}
-#elif defined(__3DS__) || defined(__amigaos4__) || defined(__DS__) || defined(__MORPHOS__) || defined(NINTENDO_SWITCH) || defined(__PSP__) || defined(PSP2) || defined(__WII__) || defined(WIN32)
+#elif defined(__3DS__) || defined(__amigaos4__) || defined(__DS__) || defined(__MORPHOS__) || defined(NINTENDO_SWITCH) || defined(__PSP__) || defined(PSP2) || defined(RISCOS) || defined(__WII__) || defined(WIN32)
// For all platforms making use of : as a drive separator, avoid useless punycoding
if (!isEscaped()) {
// If we are escaped, we have forbidden characters which must be encoded
// Try to replace all : by SEPARATOR and check if we need puny encoding: if we don't, we are safe
Path tmp(*this);
tmp._str.replace(':', SEPARATOR);
+#if defined(RISCOS)
+ // RiscOS uses these characters everywhere
+ tmp._str.replace('$', SEPARATOR);
+ tmp._str.replace('<', SEPARATOR);
+ tmp._str.replace('>', SEPARATOR);
+ // We can get ending dots when we replace $ (.$ suffix)
+ tmp._str.replace('.', SEPARATOR);
+#endif
#if defined(WIN32)
// WIN32 can also make use of ? in Win32 devices namespace
tmp._str.replace('?', SEPARATOR);
More information about the Scummvm-git-logs
mailing list