projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switched magnification to percentage, added black-border as alternative to scale
[supertux.git]
/
src
/
audio
/
sound_file.cpp
diff --git
a/src/audio/sound_file.cpp
b/src/audio/sound_file.cpp
index
2495bbb
..
98a615b
100644
(file)
--- a/
src/audio/sound_file.cpp
+++ b/
src/audio/sound_file.cpp
@@
-398,9
+398,13
@@
SoundFile* load_sound_file(const std::string& filename)
PHYSFS_file* file = PHYSFS_openRead(filename.c_str());
if(!file) {
PHYSFS_file* file = PHYSFS_openRead(filename.c_str());
if(!file) {
+ log_warning << "Couldn't open '" << filename << "': " << PHYSFS_getLastError() << ", using dummy sound file." << std::endl;
+ file = PHYSFS_openRead("sounds/empty.wav");
+ if (!file) {
std::stringstream msg;
std::stringstream msg;
- msg << "Couldn't open '" << filename << "': " << PHYSFS_getLastError();
- throw std::runtime_error(msg.str());
+ msg << "Couldn't open dummy sound file '" << filename << "': " << PHYSFS_getLastError();
+ throw std::runtime_error(msg.str());
+ }
}
try {
}
try {