File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
TheForceEngine/TFE_Editor Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ namespace TFE_Editor
178
178
179
179
CommandHeader* header = hBuffer_createHeader ();
180
180
header->cmdId = CMD_SNAPSHOT;
181
- header->cmdName = 0 ;
181
+ header->cmdName = id; // this holds the snapshot ID instead of a name for snapshots (which have their own name).
182
182
header->parentId = parentId;
183
183
header->depth = 0 ;
184
184
header->hidden = 0 ;
@@ -207,11 +207,7 @@ namespace TFE_Editor
207
207
// Callback setup by the client.
208
208
s_snapshotBuffer.clear ();
209
209
s_snapshotCreate (&s_snapshotBuffer);
210
-
211
- // TODO: Compress
212
-
213
- // Create the snapshot itself.
214
- history_createSnapshotInternal ((u32 )s_snapshotBuffer.size (), s_snapshotBuffer.data (), " " );
210
+ history_createSnapshotInternal ((u32 )s_snapshotBuffer.size (), s_snapshotBuffer.data (), s_cmdName[name].c_str ());
215
211
// Return false to let the caller know a snapshot was created instead of the command.
216
212
return false ;
217
213
}
@@ -319,7 +315,7 @@ namespace TFE_Editor
319
315
320
316
if (cmdHeader->cmdId == CMD_SNAPSHOT)
321
317
{
322
- const s32 id = cmdList[i] ;
318
+ const s32 id = cmdHeader-> cmdName ;
323
319
Snapshot* snapshot = &s_snapShots[id];
324
320
if (snapshot->uncompressedSize > snapshot->compressedSize )
325
321
{
You can’t perform that action at this time.
0 commit comments