From 8a7a81ed30697fea81a22c544543295f65f43835 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 9 Jul 2009 09:39:51 +0000 Subject: Warn instead of crash when a video frame part was found although the header says there's no video svn-id: r42286 --- graphics/video/coktelvideo/coktelvideo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'graphics') diff --git a/graphics/video/coktelvideo/coktelvideo.cpp b/graphics/video/coktelvideo/coktelvideo.cpp index 8603e125a6..995247acaa 100644 --- a/graphics/video/coktelvideo/coktelvideo.cpp +++ b/graphics/video/coktelvideo/coktelvideo.cpp @@ -1324,7 +1324,9 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) { _stream->skip(part.size); } - } else if (part.type == kPartTypeVideo) { + } else if ((part.type == kPartTypeVideo) && !_hasVideo) { + warning("Header claims there's no video, but video frame part found"); + } else if ((part.type == kPartTypeVideo) && _hasVideo) { state.flags &= ~kStateNoVideoData; uint32 size = part.size; -- cgit v1.2.3 From a0a675e42d71df188da25fa3b8fab99249874ee9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 9 Jul 2009 15:15:49 +0000 Subject: Reverted commit #42257, as the original issue was with the compilation process of MSVC and the ENABLE_* checks work correctly svn-id: r42289 --- graphics/sjis.cpp | 13 ++++--------- graphics/sjis.h | 10 ++++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'graphics') diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp index 95736cf401..5392a1c9a4 100644 --- a/graphics/sjis.cpp +++ b/graphics/sjis.cpp @@ -23,15 +23,10 @@ */ #include "graphics/sjis.h" -#include "common/debug.h" -// The code in this file is currently only used in KYRA and SCI. -// So if neither of those is enabled, we will skip compiling it. -// If you plan to use this code in another engine, you will have -// to add the proper define check here. -// Also please add the define check at the comment after the -// matching #endif further down this file. -#if defined(ENABLE_KYRA) || defined(ENABLE_SCI) +#ifdef GRAPHICS_SJIS_H + +#include "common/debug.h" namespace Graphics { @@ -198,5 +193,5 @@ uint FontTowns::sjisToChunk(uint8 f, uint8 s) { } // end of namespace Graphics -#endif // defined(ENABLE_KYRA) || defined(ENABLE_SCI) +#endif // defined(GRAPHICS_SJIS_H) diff --git a/graphics/sjis.h b/graphics/sjis.h index c7eeeed9f6..f7321742af 100644 --- a/graphics/sjis.h +++ b/graphics/sjis.h @@ -22,6 +22,14 @@ * $Id$ */ +// The code in this file is currently only used in KYRA and SCI. +// So if neither of those is enabled, we will skip compiling it. +// If you plan to use this code in another engine, you will have +// to add the proper define check here. +// Also please add the define check at the comment after the +// matching #endif further down this file. +#if defined(ENABLE_KYRA) || defined(ENABLE_SCI) + #ifndef GRAPHICS_SJIS_H #define GRAPHICS_SJIS_H @@ -123,3 +131,5 @@ private: #endif +#endif // defined(ENABLE_KYRA) || defined(ENABLE_SCI) + -- cgit v1.2.3