mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
Originally committed to SVN as r116.
This commit is contained in:
parent
3d73c9a533
commit
90e4ec6783
@ -39,7 +39,7 @@
|
|||||||
#ifndef __AVISYNTH_H__
|
#ifndef __AVISYNTH_H__
|
||||||
#define __AVISYNTH_H__
|
#define __AVISYNTH_H__
|
||||||
|
|
||||||
enum { AVISYNTH_INTERFACE_VERSION = 2 };
|
enum { AVISYNTH_INTERFACE_VERSION = 3 };
|
||||||
|
|
||||||
|
|
||||||
/* Define all types necessary for interfacing with avisynth.dll
|
/* Define all types necessary for interfacing with avisynth.dll
|
||||||
|
@ -60,16 +60,15 @@ AviSynthWrapper::AviSynthWrapper() {
|
|||||||
if (CreateScriptEnv == NULL)
|
if (CreateScriptEnv == NULL)
|
||||||
throw _T("Failed to get function from avisynth.dll");
|
throw _T("Failed to get function from avisynth.dll");
|
||||||
|
|
||||||
env = CreateScriptEnv(AVISYNTH_INTERFACE_VERSION);
|
// Require Avisynth 2.5.6+?
|
||||||
|
if (Options.AsBool(_T("Allow Ancient Avisynth")))
|
||||||
|
env = CreateScriptEnv(AVISYNTH_INTERFACE_VERSION-1);
|
||||||
|
else
|
||||||
|
env = CreateScriptEnv(AVISYNTH_INTERFACE_VERSION);
|
||||||
|
|
||||||
if (env == NULL)
|
if (env == NULL)
|
||||||
throw _T("Failed to create a new avisynth script environment. Avisynth is too old?");
|
throw _T("Failed to create a new avisynth script environment. Avisynth is too old?");
|
||||||
|
|
||||||
// Check for a new enough avisynth version by looking for the most obscure function used
|
|
||||||
// fix me, no longer useful with "Cache"?
|
|
||||||
if (!env->FunctionExists("Cache"))
|
|
||||||
throw _T("Installed version of avisynth is too old");
|
|
||||||
|
|
||||||
// Set memory limit
|
// Set memory limit
|
||||||
int memoryMax = Options.AsInt(_T("Avisynth MemoryMax"));
|
int memoryMax = Options.AsInt(_T("Avisynth MemoryMax"));
|
||||||
if (memoryMax != 0)
|
if (memoryMax != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user