[Scummvm-git-logs] scummvm master -> 98380fcf083e01a44945e54417caaf44ed51a51d
sev-
noreply at scummvm.org
Wed Jul 9 17:50:46 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
98380fcf08 QDENGINE: Add support for punycode
Commit: 98380fcf083e01a44945e54417caaf44ed51a51d
https://github.com/scummvm/scummvm/commit/98380fcf083e01a44945e54417caaf44ed51a51d
Author: Alikhan Balpykov (luxrage1990 at gmail.com)
Date: 2025-07-09T19:50:43+02:00
Commit Message:
QDENGINE: Add support for punycode
Changed paths:
engines/qdengine/minigames/adv/m_karaoke.cpp
engines/qdengine/qdcore/util/WinVideo.cpp
engines/qdengine/qdcore/util/plaympp_api.cpp
diff --git a/engines/qdengine/minigames/adv/m_karaoke.cpp b/engines/qdengine/minigames/adv/m_karaoke.cpp
index 95cfa7113e5..e836c2c03ba 100644
--- a/engines/qdengine/minigames/adv/m_karaoke.cpp
+++ b/engines/qdengine/minigames/adv/m_karaoke.cpp
@@ -138,9 +138,14 @@ Karaoke::Karaoke(MinigameManager *runtime) {
return;
Common::File file;
- if (!file.open(Common::Path((const char *)transCyrillic(fileName), '\\'))) {
- assert(!(Common::String() + "Ðе ÑдалоÑÑ Ð¾ÑкÑÑÑÑ Ñайл \"" + fileName + "\"").c_str());
- return;
+ Common::Path path((const char *)transCyrillic(fileName), '\\');
+
+ if (!file.open(path)) {
+ // Try with punyencoded path
+ if (!file.open(path.punycodeEncode())) {
+ assert(!(Common::String() + "Ðе ÑдалоÑÑ Ð¾ÑкÑÑÑÑ Ñайл \"" + fileName + "\"").c_str());
+ return;
+ }
}
Parse(file, _nodes);
diff --git a/engines/qdengine/qdcore/util/WinVideo.cpp b/engines/qdengine/qdcore/util/WinVideo.cpp
index f2835c31234..3856ccb67a9 100644
--- a/engines/qdengine/qdcore/util/WinVideo.cpp
+++ b/engines/qdengine/qdcore/util/WinVideo.cpp
@@ -81,10 +81,13 @@ bool winVideo::open_file(const Common::Path &fname) {
_videostream = new Common::File();
if (!_videostream->open(filename.c_str())) {
- warning("WinVideo::open: Failed to open file %s", filename.c_str());
- delete _videostream;
- _videostream = nullptr;
- return false;
+ // Try with punyencoded path
+ if (!_videostream->open(Common::Path(filename).punycodeEncode())) {
+ warning("WinVideo::open: Failed to open file %s", filename.c_str());
+ delete _videostream;
+ _videostream = nullptr;
+ return false;
+ }
}
// WORKAROUND: Fix lagging audio in mng and rybalka
diff --git a/engines/qdengine/qdcore/util/plaympp_api.cpp b/engines/qdengine/qdcore/util/plaympp_api.cpp
index dfa8e64afa6..0d8873daa9f 100644
--- a/engines/qdengine/qdcore/util/plaympp_api.cpp
+++ b/engines/qdengine/qdcore/util/plaympp_api.cpp
@@ -54,32 +54,36 @@ bool mpegPlayer::play(const Common::Path &file, bool loop, int vol) {
Common::SeekableReadStream *stream;
- if (qdFileManager::instance().open_file(&stream, file, false)) {
- Audio::SeekableAudioStream *audiostream;
+ if (!qdFileManager::instance().open_file(&stream, file, false)) {
+ if (!qdFileManager::instance().open_file(&stream, file.punycodeEncode(), false)) {
+ warning(" mpegPlayer::play(): Failed to open file %s", file.toString().c_str());
+ }
+ }
+
+ Audio::SeekableAudioStream *audiostream;
- if (isOGG) {
+ if (isOGG) {
#ifdef USE_VORBIS
- audiostream = Audio::makeVorbisStream(stream, DisposeAfterUse::YES);
+ audiostream = Audio::makeVorbisStream(stream, DisposeAfterUse::YES);
#else
- warning("mpegPlayer::play(%s, %d, %d): Vorbis support not compiled", file.toString().c_str(), loop, vol);
- return false;
+ warning("mpegPlayer::play(%s, %d, %d): Vorbis support not compiled", file.toString().c_str(), loop, vol);
+ return false;
#endif
- } else {
+ } else {
#ifdef USE_MPCDEC
- audiostream = Audio::makeMPCStream(stream, DisposeAfterUse::YES);
+ audiostream = Audio::makeMPCStream(stream, DisposeAfterUse::YES);
#else
- warning("mpegPlayer::play(%s, %d, %d): MPC support not compiled", file.toString().c_str(), loop, vol);
- return false;
+ warning("mpegPlayer::play(%s, %d, %d): MPC support not compiled", file.toString().c_str(), loop, vol);
+ return false;
#endif
- }
+ }
- if (!loop) {
- g_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, audiostream);
- } else {
- Audio::LoopingAudioStream *looped = new Audio::LoopingAudioStream(audiostream, 0, DisposeAfterUse::YES);
+ if (!loop) {
+ g_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, audiostream);
+ } else {
+ Audio::LoopingAudioStream *looped = new Audio::LoopingAudioStream(audiostream, 0, DisposeAfterUse::YES);
- g_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, looped);
- }
+ g_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, looped);
}
set_volume(vol);
More information about the Scummvm-git-logs
mailing list