forked from mia/Aegisub
Possible fix for Perl.
Originally committed to SVN as r1997.
This commit is contained in:
parent
825b2f3af0
commit
f20fc57d22
3 changed files with 37 additions and 10 deletions
|
@ -547,6 +547,16 @@ namespace Automation4 {
|
||||||
PERL_SYS_TERM();
|
PERL_SYS_TERM();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Script* PerlScriptFactory::Produce(const wxString &filename) const
|
||||||
|
{
|
||||||
|
if(filename.EndsWith(_T(PERL_SCRIPT_EXTENSION))) {
|
||||||
|
return new PerlScript(filename);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -252,17 +252,8 @@ namespace Automation4 {
|
||||||
PerlScriptFactory();
|
PerlScriptFactory();
|
||||||
~PerlScriptFactory();
|
~PerlScriptFactory();
|
||||||
|
|
||||||
virtual Script* Produce(const wxString &filename) const
|
Script* Produce(const wxString &filename) const;
|
||||||
{
|
|
||||||
if(filename.EndsWith(_T(PERL_SCRIPT_EXTENSION))) {
|
|
||||||
return new PerlScript(filename);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,12 +87,38 @@ void StartupLog(const wxString &msg) {
|
||||||
#define StartupLog(a)
|
#define StartupLog(a)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __VISUALC__
|
||||||
|
#define MS_VC_EXCEPTION 0x406d1388
|
||||||
|
|
||||||
|
typedef struct tagTHREADNAME_INFO {
|
||||||
|
DWORD dwType; // must be 0x1000
|
||||||
|
LPCSTR szName; // pointer to name (in same addr space)
|
||||||
|
DWORD dwThreadID; // thread ID (-1 caller thread)
|
||||||
|
DWORD dwFlags; // reserved for future use, most be zero
|
||||||
|
} THREADNAME_INFO;
|
||||||
|
|
||||||
|
void SetThreadName(DWORD dwThreadID, LPCSTR szThreadName) {
|
||||||
|
THREADNAME_INFO info;
|
||||||
|
info.dwType = 0x1000;
|
||||||
|
info.szName = szThreadName;
|
||||||
|
info.dwThreadID = dwThreadID;
|
||||||
|
info.dwFlags = 0;
|
||||||
|
__try {
|
||||||
|
RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(DWORD), (DWORD *)&info);
|
||||||
|
}
|
||||||
|
__except (EXCEPTION_CONTINUE_EXECUTION) {}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Initialization function
|
// Initialization function
|
||||||
// -----------------------
|
// -----------------------
|
||||||
// Gets called when application starts, creates MainFrame
|
// Gets called when application starts, creates MainFrame
|
||||||
bool AegisubApp::OnInit() {
|
bool AegisubApp::OnInit() {
|
||||||
|
#ifdef __VISUALC__
|
||||||
|
SetThreadName(-1,"AegiMain");
|
||||||
|
#endif
|
||||||
|
|
||||||
StartupLog(_T("Inside OnInit"));
|
StartupLog(_T("Inside OnInit"));
|
||||||
frame = NULL;
|
frame = NULL;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue