Subversion Repositories filter_foundry

Rev

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

Rev 301 Rev 309
Line 219... Line 219...
219
        case filterSelectorAbout:
219
        case filterSelectorAbout:
220
                if (!gdata) {
220
                if (!gdata) {
221
                        gdata = (globals_t*)malloc(sizeof(globals_t));
221
                        gdata = (globals_t*)malloc(sizeof(globals_t));
222
                        if (!gdata) break;
222
                        if (!gdata) break;
223
                        gdata->standalone = gdata->parmloaded = readPARMresource((HMODULE)hDllInstance,&reason,READ_OBFUSC);
223
                        gdata->standalone = gdata->parmloaded = readPARMresource((HMODULE)hDllInstance,&reason,READ_OBFUSC);
-
 
224
                        if (gdata->parmloaded && (gdata->parm.cbSize != PARM_SIZE) && (gdata->parm.cbSize != PARM_SIZE_PREMIERE) && (gdata->parm.cbSize != PARM_SIG_MAC)) {
-
 
225
                                if (gdata->obfusc) {
-
 
226
                                        simplealert(_strdup("Incompatible obfuscation."));
-
 
227
                                }
-
 
228
                                else {
-
 
229
                                        simplealert(_strdup("Invalid parameter data."));
-
 
230
                                }
-
 
231
                        }
-
 
232
                        else {
224
                        DoAbout((AboutRecordPtr)pb);
233
                                DoAbout((AboutRecordPtr)pb);
-
 
234
                        }
225
                        free(gdata);
235
                        free(gdata);
226
                        gdata = NULL;
236
                        gdata = NULL;
227
                } else {
237
                } else {
228
                        DoAbout((AboutRecordPtr)pb);
238
                        DoAbout((AboutRecordPtr)pb);
229
                }
239
                }
Line 366... Line 376...
366
 
376
 
367
                // We need to set gdata->standalone after loadfile(), but we must call readPARMresource() before loadfile()
377
                // We need to set gdata->standalone after loadfile(), but we must call readPARMresource() before loadfile()
368
                // Reason: readPARMresource() reads parameters from the DLL while loadfile() reads parameters from the AFS file
378
                // Reason: readPARMresource() reads parameters from the DLL while loadfile() reads parameters from the AFS file
369
                // But loadfile() will reset gdata->standalone ...
379
                // But loadfile() will reset gdata->standalone ...
370
                isStandalone = readPARMresource((HMODULE)hDllInstance, &reason, READ_OBFUSC);
380
                isStandalone = readPARMresource((HMODULE)hDllInstance, &reason, READ_OBFUSC);
-
 
381
                if (isStandalone && (gdata->parm.cbSize != PARM_SIZE) && (gdata->parm.cbSize != PARM_SIZE_PREMIERE) && (gdata->parm.cbSize != PARM_SIG_MAC)) {
-
 
382
                        if (gdata->obfusc) {
-
 
383
                                simplealert(_strdup("Incompatible obfuscation."));
-
 
384
                        }
-
 
385
                        else {
-
 
386
                                simplealert(_strdup("Invalid parameter data."));
-
 
387
                        }
-
 
388
                        gdata->parmloaded = false;
-
 
389
                        return false;
-
 
390
                }
371
 
391
 
372
                tempdir = getenv("TMP");
392
                tempdir = getenv("TMP");
373
                #ifdef WIN_ENV
393
                #ifdef WIN_ENV
374
                if (strlen(tempdir) > 0) strcat(tempdir, "\\");
394
                if (strlen(tempdir) > 0) strcat(tempdir, "\\");
375
                #else
395
                #else
Line 411... Line 431...
411
                /* either the parameter handle was uninitialised,
431
                /* either the parameter handle was uninitialised,
412
                   or the parameter data couldn't be read; set default values */
432
                   or the parameter data couldn't be read; set default values */
413
 
433
 
414
                // see if saved parameters exist
434
                // see if saved parameters exist
415
                gdata->standalone = gdata->parmloaded = readPARMresource((HMODULE)hDllInstance,&reason,READ_OBFUSC);
435
                gdata->standalone = gdata->parmloaded = readPARMresource((HMODULE)hDllInstance,&reason,READ_OBFUSC);
-
 
436
                if (gdata->parmloaded && (gdata->parm.cbSize != PARM_SIZE) && (gdata->parm.cbSize != PARM_SIZE_PREMIERE) && (gdata->parm.cbSize != PARM_SIG_MAC)) {
-
 
437
                        if (gdata->obfusc) {
-
 
438
                                simplealert(_strdup("Incompatible obfuscation."));
-
 
439
                        }
-
 
440
                        else {
-
 
441
                                simplealert(_strdup("Invalid parameter data."));
-
 
442
                        }
-
 
443
                        gdata->parmloaded = false;
-
 
444
                        return false;
416
 
445
                }
417
 
446
 
418
                if(!gdata->standalone){
447
                if(!gdata->standalone){
419
                        // no saved settings (not standalone)
448
                        // no saved settings (not standalone)
420
                        for(i = 0; i < 8; ++i)
449
                        for(i = 0; i < 8; ++i)
421
                                slider[i] = i*10+100;
450
                                slider[i] = i*10+100;