From 2bd558efae22d0c4cf3d28213f4be633718c5b49 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Wed, 19 Apr 2006 21:55:02 +0000 Subject: [PATCH] Originally committed to SVN as r349. --- core/version.cpp | 2 +- core/vfw_wrap.cpp | 6 ++++-- core/video_display.cpp | 11 ++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/core/version.cpp b/core/version.cpp index e96691507..1d1c52b46 100644 --- a/core/version.cpp +++ b/core/version.cpp @@ -46,7 +46,7 @@ wxString GetAegisubVersionString() { #ifdef _DEBUG - return T("v1.10 Beta (debug)"); + return _T("v1.10 Beta (debug)"); #else return _T("v1.10 Beta PRE-RELEASE"); #endif diff --git a/core/vfw_wrap.cpp b/core/vfw_wrap.cpp index 420bdeb6d..e645eee89 100644 --- a/core/vfw_wrap.cpp +++ b/core/vfw_wrap.cpp @@ -40,16 +40,17 @@ /////////// // Headers #include "vfw_wrap.h" +#ifdef __WINDOWS__ #include +#endif ///////////////////// // Get keyframe list wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) { wxArrayInt frames; - char buffer[512]; - strcpy(buffer,filename.mb_str(wxConvLocal)); +#ifdef __WINDOWS__ // Init vfw AVIFileInit(); @@ -85,6 +86,7 @@ wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) { // Clean up AVIFileRelease(pfile); AVIFileExit(); +#endif return frames; } diff --git a/core/video_display.cpp b/core/video_display.cpp index 09620c78b..f01728228 100644 --- a/core/video_display.cpp +++ b/core/video_display.cpp @@ -44,9 +44,7 @@ #include "ass_dialogue.h" #include "subs_grid.h" #include "vfw_wrap.h" -#if 0 #include "mkv_wrap.h" -#endif #include "options.h" #include "subs_edit_box.h" #include "audio_display.h" @@ -146,6 +144,7 @@ void VideoDisplay::UpdateSize() { } } + /////////////////////// // Sets video filename void VideoDisplay::SetVideo(const wxString &filename) { @@ -170,7 +169,8 @@ void VideoDisplay::SetVideo(const wxString &filename) { provider->SetDAR(GetARFromType(arType)); KeyFrames.Clear(); -#if 0 + + // Why the hell was this disabled? // Read extra data from file bool mkvOpen = MatroskaWrapper::wrapper.IsOpen(); wxString ext = filename.Right(4).Lower(); @@ -192,7 +192,6 @@ void VideoDisplay::SetVideo(const wxString &filename) { } #ifdef __WIN32__ else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename); -#endif #endif // Update size @@ -217,7 +216,9 @@ void VideoDisplay::SetVideo(const wxString &filename) { RefreshVideo(); UpdatePositionDisplay(); - } catch (wxString &e) { + } + + catch (wxString &e) { wxMessageBox(e,_T("Error setting video"),wxICON_ERROR | wxOK); } }