From: ronag Date: Wed, 17 Aug 2011 13:41:10 +0000 (+0000) Subject: 2.0. main: Added unhandled exception filter. X-Git-Tag: 2.0.1~131 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b894c11dacb36ed21a4bf1b352bcc9cf823b709b;p=casparcg 2.0. main: Added unhandled exception filter. git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@1209 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d --- diff --git a/core/video_format.cpp b/core/video_format.cpp index ce7615650..56e7502cb 100644 --- a/core/video_format.cpp +++ b/core/video_format.cpp @@ -62,7 +62,7 @@ const video_format_desc format_descs[video_format::count] = DEFINE_VIDEOFORMATDESC(video_format::x1080p2997 ,1920, 1080, video_mode::progressive, 30000, 1001, L"1080p2997"), DEFINE_VIDEOFORMATDESC(video_format::x1080p3000 ,1920, 1080, video_mode::progressive, 30, 1, L"1080p3000"), DEFINE_VIDEOFORMATDESC(video_format::x1080p5000 ,1920, 1080, video_mode::progressive, 50, 1, L"1080p5000"), - DEFINE_VIDEOFORMATDESC(video_format::invalid ,0, 0, video_mode::count, 1, 1, L"invalid") + DEFINE_VIDEOFORMATDESC(video_format::invalid ,0, 0, video_mode::progressive, 1, 1, L"invalid") }; const video_format_desc& video_format_desc::get(video_format::type format) diff --git a/core/video_format.h b/core/video_format.h index 3bac87d69..ee510e2f6 100644 --- a/core/video_format.h +++ b/core/video_format.h @@ -55,10 +55,9 @@ struct video_mode { enum type { - progressive = 0, - lower, - upper, - count + lower = 1, + upper = 2, + progressive = 3 // NOTE: progressive == lower | upper; }; static std::wstring print(video_mode::type value) diff --git a/shell/CasparCG.ico b/shell/CasparCG.ico index 41771dc3e..ec0f7a99a 100644 Binary files a/shell/CasparCG.ico and b/shell/CasparCG.ico differ diff --git a/shell/casparcg.config b/shell/casparcg.config index 20d4ea53e..0069a42fd 100644 --- a/shell/casparcg.config +++ b/shell/casparcg.config @@ -46,23 +46,16 @@ - 1080p5000 + 1080i5000 1 true true - - - - 1080p5000 - - - 2 - true - true - + + 1 + diff --git a/shell/main.cpp b/shell/main.cpp index 1b20e818c..e57662908 100644 --- a/shell/main.cpp +++ b/shell/main.cpp @@ -36,6 +36,7 @@ #define WIN32_LEAN_AND_MEAN #include +#include #include #include @@ -143,11 +144,25 @@ void print_info() CASPAR_LOG(info) << L"FFMPEG-swscale " << caspar::get_swscale_version(); CASPAR_LOG(info) << L"OpenGL " << caspar::core::ogl_device::get_version() << "\n\n"; } - + +LONG WINAPI UserUnhandledExceptionFilter(EXCEPTION_POINTERS* info) +{ + CASPAR_LOG(fatal) << L"#######################\n UNHANDLED EXCEPTION: \n" + << L"Adress:" << info->ExceptionRecord->ExceptionAddress << L"\n" + << L"Code:" << info->ExceptionRecord->ExceptionCode << L"\n" + << L"Flag:" << info->ExceptionRecord->ExceptionFlags << L"\n" + << L"Info:" << info->ExceptionRecord->ExceptionInformation << L"\n" + << L"Continuing execution. \n#######################"; + + return EXCEPTION_CONTINUE_EXECUTION; +} + int main(int argc, wchar_t* argv[]) { static_assert(sizeof(void*) == 4, "64-bit code generation is not supported."); + SetUnhandledExceptionFilter(UserUnhandledExceptionFilter); + CASPAR_LOG(info) << L"Type \"q\" to close application"; CASPAR_LOG(info) << L"THIS IS AN ALPHA BUILD";