From fdcb1857c8b2f75a5e72f520446c3dbf4083ea65 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Thu, 23 Feb 2006 04:19:57 +0000 Subject: [PATCH] Some tweaks to help Linux compatibility Originally committed to SVN as r124. --- core/avisynth_wrap.cpp | 4 ++++ core/avisynth_wrap.h | 6 +++++- core/frame_main.cpp | 2 ++ core/main.cpp | 7 ------- core/subs_grid.cpp | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/core/avisynth_wrap.cpp b/core/avisynth_wrap.cpp index e0b52e97c..26469176a 100644 --- a/core/avisynth_wrap.cpp +++ b/core/avisynth_wrap.cpp @@ -37,6 +37,8 @@ //////////// // Includes #include "avisynth_wrap.h" + +#ifdef __WINDOWS__ #include "options.h" /////////////////////////////// @@ -86,3 +88,5 @@ AviSynthWrapper::~AviSynthWrapper() { FreeLibrary(hLib); } } + +#endif diff --git a/core/avisynth_wrap.h b/core/avisynth_wrap.h index c626f32e4..feff139ef 100644 --- a/core/avisynth_wrap.h +++ b/core/avisynth_wrap.h @@ -40,10 +40,13 @@ /////////// // Headers -#include #include + +#ifdef __WINDOWS__ +#include #include "avisynth.h" + ////////////////////////////////// // Typedef to make my life easier typedef IScriptEnvironment* __stdcall FUNC(int); @@ -65,3 +68,4 @@ public: }; #endif +#endif diff --git a/core/frame_main.cpp b/core/frame_main.cpp index ea827fd01..5d63db80a 100644 --- a/core/frame_main.cpp +++ b/core/frame_main.cpp @@ -893,10 +893,12 @@ void FrameMain::LoadAudio(wxString filename,bool FromVideo) { wxString err(error); wxMessageBox(err, _T("Error opening audio file"), wxOK | wxICON_ERROR, this); } + #ifdef __WINDOWS__ catch (AvisynthError err) { wxMessageBox (wxString(_T("AviSynth error: ")) + wxString(err.msg,wxConvUTF8), _T("Error loading audio"), wxOK | wxICON_ERROR); return; } + #endif catch (...) { wxMessageBox(_T("Unknown error"), _T("Error opening audio file"), wxOK | wxICON_ERROR, this); } diff --git a/core/main.cpp b/core/main.cpp index 2c88e9f57..ca032188a 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -34,13 +34,6 @@ // -//////////////////////////// -// Enable XP-style controls -//#if defined(__WXMSW__) && !defined(__WXWINCE__) -//#pragma comment(linker, "\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df'\"") -//#endif - - //////////// // Includes #include diff --git a/core/subs_grid.cpp b/core/subs_grid.cpp index 2e4a855a3..e188dd00d 100644 --- a/core/subs_grid.cpp +++ b/core/subs_grid.cpp @@ -1056,7 +1056,7 @@ void SubtitlesGrid::SplitLine(int n,int pos,int mode) { ////////////////// // Commit changes // -------------- -// This will save the work .ass and make avisynth refresh it +// This will save the work .ass and refresh it void SubtitlesGrid::CommitChanges(bool force) { if (video->loaded || force) { // Check if it's playing