|
@@ -772,7 +772,7 @@ laProp* laPropContainerManageable(laPropContainer* pc, int offset_of_dummy_list)
|
|
laAddSubGroup(MAIN.SaverDummyContainer, "__file", "File", "The file this block came from/saves to", "managed_udf",
|
|
laAddSubGroup(MAIN.SaverDummyContainer, "__file", "File", "The file this block came from/saves to", "managed_udf",
|
|
0,LA_WIDGET_COLLECTION_SELECTOR,laui_ManagedUDFItem,-1,laget_InstanceUDF,laget_InstanceActiveUDF,laget_ListNext,laset_InstanceUDF,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
|
|
0,LA_WIDGET_COLLECTION_SELECTOR,laui_ManagedUDFItem,-1,laget_InstanceUDF,laget_InstanceActiveUDF,laget_ListNext,laset_InstanceUDF,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
|
|
}
|
|
}
|
|
- pc->SaverDummy=laAddSubGroup(pc,"__single_saver_dummy","Saver","Saver dummy","la_saver_dummy",0,0,0,-1,0,0,0,0,0,0,offset_of_dummy_list,LA_UDF_IGNORE);
|
|
|
|
|
|
+ pc->SaverDummy=laAddSubGroup(pc,"__single_saver_dummy","Saver","Saver dummy","la_saver_dummy",0,0,0,-1,0,0,0,0,0,0,offset_of_dummy_list,0);
|
|
return pc->SaverDummy;
|
|
return pc->SaverDummy;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3597,7 +3597,7 @@ int laExtractUDF(laUDF *udf, laManagedUDF* mUDF, int Mode){
|
|
ma_device_stop(&MAIN.Audio->AudioDevice);
|
|
ma_device_stop(&MAIN.Audio->AudioDevice);
|
|
if(MAIN.InitArgs.HasAudio) laSpinLock(&MAIN.Audio->AudioStatusLock);
|
|
if(MAIN.InitArgs.HasAudio) laSpinLock(&MAIN.Audio->AudioStatusLock);
|
|
|
|
|
|
- MAIN.IsReadingUDF = 1;
|
|
|
|
|
|
+ MAIN.ReadingUDF = udf;
|
|
|
|
|
|
la_ReadBuffer(udf, sizeof(LA_UDF_IDENTIFIER) - 1, Identifier);
|
|
la_ReadBuffer(udf, sizeof(LA_UDF_IDENTIFIER) - 1, Identifier);
|
|
|
|
|
|
@@ -3646,7 +3646,7 @@ int laExtractUDF(laUDF *udf, laManagedUDF* mUDF, int Mode){
|
|
|
|
|
|
laHideProgress();
|
|
laHideProgress();
|
|
|
|
|
|
- MAIN.IsReadingUDF = 0;
|
|
|
|
|
|
+ MAIN.ReadingUDF = 0;
|
|
|
|
|
|
laUDFPropSegment* ps; while (ps = lstPopItem(&udf->PropsToOperate)){ strSafeDestroy(&ps->Path); FreeMem(ps); }
|
|
laUDFPropSegment* ps; while (ps = lstPopItem(&udf->PropsToOperate)){ strSafeDestroy(&ps->Path); FreeMem(ps); }
|
|
|
|
|
|
@@ -4132,14 +4132,14 @@ void la_ClearUDFRegistryAndFolders(){
|
|
|
|
|
|
//==========================================================================[undo]
|
|
//==========================================================================[undo]
|
|
|
|
|
|
-void laPushDifferenceOnly(char* Description, u64bit hint){ if(MAIN.IsReadingUDF){ return; }
|
|
|
|
|
|
+void laPushDifferenceOnly(char* Description, u64bit hint){ if(MAIN.ReadingUDF){ return; }
|
|
laDiff* d=memAcquire(sizeof(laDiff));
|
|
laDiff* d=memAcquire(sizeof(laDiff));
|
|
lstAppendItem(&MAIN.Differences, d);
|
|
lstAppendItem(&MAIN.Differences, d);
|
|
if(MAIN.HeadDifference && Description) strSafeSet(&MAIN.HeadDifference->Description,Description);
|
|
if(MAIN.HeadDifference && Description) strSafeSet(&MAIN.HeadDifference->Description,Description);
|
|
d->Hint=hint; MAIN.HeadDifference=d;
|
|
d->Hint=hint; MAIN.HeadDifference=d;
|
|
laNotifyUsers("la.differences");
|
|
laNotifyUsers("la.differences");
|
|
}
|
|
}
|
|
-void laPushDifferences(char* Description, u64bit hint){ if(MAIN.IsReadingUDF){ return; }
|
|
|
|
|
|
+void laPushDifferences(char* Description, u64bit hint){ if(MAIN.ReadingUDF){ return; }
|
|
if(MAIN.HeadDifference && (!MAIN.HeadDifference->Commands.pFirst) && (!MAIN.HeadDifference->CustomCommands.pFirst)) return;
|
|
if(MAIN.HeadDifference && (!MAIN.HeadDifference->Commands.pFirst) && (!MAIN.HeadDifference->CustomCommands.pFirst)) return;
|
|
memFreeRemainingLeftNodes();
|
|
memFreeRemainingLeftNodes();
|
|
laPushDifferenceOnly(Description,hint);
|
|
laPushDifferenceOnly(Description,hint);
|
|
@@ -4815,12 +4815,12 @@ laDBProp* laFindStartingDBProp(laProp* p, void* Instance, laPropContainer* Insta
|
|
}
|
|
}
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
-void laRecordCustomDifferences(void* Data, laDiffCommandUndoF Undo, laDiffCommandRedoF Redo, laDiffCommandFreeF Free){ if(MAIN.IsReadingUDF){ return 0; }
|
|
|
|
|
|
+void laRecordCustomDifferences(void* Data, laDiffCommandUndoF Undo, laDiffCommandRedoF Redo, laDiffCommandFreeF Free){ if(MAIN.ReadingUDF){ return 0; }
|
|
laDiffCommandCustom* dcc=memAcquire(sizeof(laDiffCommandCustom));
|
|
laDiffCommandCustom* dcc=memAcquire(sizeof(laDiffCommandCustom));
|
|
dcc->Data=Data; dcc->Undo=Undo; dcc->Redo=Redo; dcc->Free=Free;
|
|
dcc->Data=Data; dcc->Undo=Undo; dcc->Redo=Redo; dcc->Free=Free;
|
|
lstAppendItem(&MAIN.HeadDifference->CustomCommands,dcc);
|
|
lstAppendItem(&MAIN.HeadDifference->CustomCommands,dcc);
|
|
}
|
|
}
|
|
-int laRecordDifferences(laPropPack* base, char* path){ if(MAIN.IsReadingUDF){ return 0; }
|
|
|
|
|
|
+int laRecordDifferences(laPropPack* base, char* path){ if(MAIN.ReadingUDF){ return 0; }
|
|
laPropPack PP={0};
|
|
laPropPack PP={0};
|
|
if(!la_GetPropFromPath(&PP,base,path,0)) return 0;
|
|
if(!la_GetPropFromPath(&PP,base,path,0)) return 0;
|
|
la_StepPropPack(&PP);
|
|
la_StepPropPack(&PP);
|
|
@@ -4841,7 +4841,7 @@ int laRecordDifferences(laPropPack* base, char* path){ if(MAIN.IsReadingUDF){ re
|
|
la_FreePropStepCache(PP.Go);
|
|
la_FreePropStepCache(PP.Go);
|
|
return success;
|
|
return success;
|
|
}
|
|
}
|
|
-int laRecordInstanceDifferences(void* instance, const char* container){ if(MAIN.IsReadingUDF){ return 0; }
|
|
|
|
|
|
+int laRecordInstanceDifferences(void* instance, const char* container){ if(MAIN.ReadingUDF){ return 0; }
|
|
laPropContainer* pc=la_ContainerLookup(container);
|
|
laPropContainer* pc=la_ContainerLookup(container);
|
|
if(!pc){ logPrintNew("Undo warning: No container named \"%s\"\n",container); return 0; }
|
|
if(!pc){ logPrintNew("Undo warning: No container named \"%s\"\n",container); return 0; }
|
|
laDBInst* FromDBI=0;
|
|
laDBInst* FromDBI=0;
|
|
@@ -4860,17 +4860,17 @@ int laRecordInstanceDifferences(void* instance, const char* container){ if(MAIN.
|
|
|
|
|
|
return success;
|
|
return success;
|
|
}
|
|
}
|
|
-void laRecordAndPush(laPropPack* base, char* path, char* description, uint64_t hint){ if(MAIN.IsReadingUDF){ return; }
|
|
|
|
|
|
+void laRecordAndPush(laPropPack* base, char* path, char* description, uint64_t hint){ if(MAIN.ReadingUDF){ return; }
|
|
if(laRecordDifferences(base, path)){ laPushDifferences(description, hint); }
|
|
if(laRecordDifferences(base, path)){ laPushDifferences(description, hint); }
|
|
}
|
|
}
|
|
-void laRecordAndPushProp(laPropPack* base, char* path){ if(MAIN.IsReadingUDF){ return; }
|
|
|
|
|
|
+void laRecordAndPushProp(laPropPack* base, char* path){ if(MAIN.ReadingUDF){ return; }
|
|
char buf[256]={0};
|
|
char buf[256]={0};
|
|
if(laRecordDifferences(base, path)){
|
|
if(laRecordDifferences(base, path)){
|
|
la_GetPropPackFullPath(base,&buf[strlen(buf)]);if(path){sprintf(&buf[strlen(buf)],"%s%s",base?".":"",path);}
|
|
la_GetPropPackFullPath(base,&buf[strlen(buf)]);if(path){sprintf(&buf[strlen(buf)],"%s%s",base?".":"",path);}
|
|
laPushDifferences(buf, 0);
|
|
laPushDifferences(buf, 0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-void laRecordEverythingAndPush(){ if(MAIN.IsReadingUDF){ return; }
|
|
|
|
|
|
+void laRecordEverythingAndPush(){ if(MAIN.ReadingUDF){ return; }
|
|
for(laDBRecordedProp* rp=MAIN.DBRecordedProps.pFirst;rp;rp=rp->Item.pNext){
|
|
for(laDBRecordedProp* rp=MAIN.DBRecordedProps.pFirst;rp;rp=rp->Item.pNext){
|
|
laRecordAndPushProp(0, rp->OriginalPath->Ptr);
|
|
laRecordAndPushProp(0, rp->OriginalPath->Ptr);
|
|
}
|
|
}
|