Subversion Repositories filter_foundry

Rev

Rev 227 | Rev 232 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 231
Line 57... Line 57...
57
void ENTRYPOINT(short selector,FilterRecordPtr pb,intptr_t *data,short *result);
57
void ENTRYPOINT(short selector,FilterRecordPtr pb,intptr_t *data,short *result);
58
 
58
 
59
DLLEXPORT MACPASCAL
59
DLLEXPORT MACPASCAL
60
void ENTRYPOINT(short selector, FilterRecordPtr pb, intptr_t *data, short *result){
60
void ENTRYPOINT(short selector, FilterRecordPtr pb, intptr_t *data, short *result){
61
        static Boolean wantdialog = false;
61
        static Boolean wantdialog = false;
-
 
62
        static Boolean premiereWarnedOnce = false;
62
        OSErr e = noErr;
63
        OSErr e = noErr;
63
        char *reason;
64
        char *reason;
-
 
65
#ifdef WIN_ENV
-
 
66
        // For Windows, we use an activation context to enforce that our Manifest resource will
-
 
67
        // be used. This allows us to use Visual Styles, even if the host application does not
-
 
68
        // support it.
-
 
69
        ManifestActivationCtx manifestVars;
-
 
70
        BOOL activationContextUsed;
-
 
71
#endif
64
 
72
 
65
        /*
73
        /*
66
        char* s = (char*)malloc(512);
74
        char* s = (char*)malloc(512);
67
        sprintf(s, "Host signature: '%c%c%c%c' (%d)\nMaxSpace32 = %d\nMaxSpace64 = %lld\nNum buffer procs: %d", (pb->hostSig >> 24) & 0xFF, (pb->hostSig >> 16) & 0xFF, (pb->hostSig >> 8) & 0xFF, pb->hostSig & 0xFF, pb->hostSig, pb->maxSpace, pb->maxSpace64, pb->bufferProcs->numBufferProcs);
75
        sprintf(s, "Host signature: '%c%c%c%c' (%d)\nMaxSpace32 = %d\nMaxSpace64 = %lld\nNum buffer procs: %d", (pb->hostSig >> 24) & 0xFF, (pb->hostSig >> 16) & 0xFF, (pb->hostSig >> 8) & 0xFF, pb->hostSig & 0xFF, pb->hostSig, pb->maxSpace, pb->maxSpace64, pb->bufferProcs->numBufferProcs);
68
        simplealert(s);
76
        simplealert(s);
69
        */
77
        */
70
 
78
 
71
#ifdef WIN_ENV
79
        if (pb->hostSig == HOSTSIG_ADOBE_PREMIERE) {
-
 
80
                // DM 19.07.2021 : Tried running the 8BF file in Adobe Premiere 5 (yes, that's possible,
-
 
81
                // and there is even a FilterFactory for Premeire!),
72
        // For Windows, we use an activation context to enforce that our Manifest resource will
82
                // but it crashes in evalpixel() where there is write-access to the "outp".
73
        // be used. This allows us to use Visual Styles, even if the host application does not
83
                // Probably the canvas structure is different (maybe it contains frames to achieve transitions?)
74
        // support it.
84
                if (!premiereWarnedOnce) {
-
 
85
                        simplealert("This version of Filter Foundry is not compatible with Adobe Premiere!");
-
 
86
                }
75
        ManifestActivationCtx manifestVars;
87
                premiereWarnedOnce = true;
76
        BOOL activationContextUsed;
88
                *result = filterBadParameters;
-
 
89
                return;
-
 
90
        }
77
 
91
 
-
 
92
#ifdef WIN_ENV
78
        activationContextUsed = ActivateManifest((HMODULE)hDllInstance, 1, &manifestVars);
93
        activationContextUsed = ActivateManifest((HMODULE)hDllInstance, 1, &manifestVars);
79
#endif
94
#endif
80
 
95
 
81
        if(selector != filterSelectorAbout && !*data){
96
        if(selector != filterSelectorAbout && !*data){
82
                BufferID tempId;
97
                BufferID tempId;