summaryrefslogtreecommitdiff
path: root/src/interface/SaveButton.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-03 16:08:56 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-03 16:08:56 (GMT)
commit838a612026c821c03e663c818d4bc9fe740febd8 (patch)
tree4b467bec3336452d8f65793b1cee31f0ffb05d2e /src/interface/SaveButton.cpp
parent73c5082cbcdd3a986765723bd4182e45386ce766 (diff)
downloadpowder-838a612026c821c03e663c818d4bc9fe740febd8.zip
powder-838a612026c821c03e663c818d4bc9fe740febd8.tar.gz
Use a single instance of a background simulation for thumbnail rendering
Diffstat (limited to 'src/interface/SaveButton.cpp')
-rw-r--r--src/interface/SaveButton.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp
index 6b0e9cf..d044ef6 100644
--- a/src/interface/SaveButton.cpp
+++ b/src/interface/SaveButton.cpp
@@ -6,6 +6,7 @@
#include "Global.h"
#include "Engine.h"
#include "client/Client.h"
+#include "simulation/SaveRenderer.h"
namespace ui {
@@ -61,7 +62,7 @@ void SaveButton::Tick(float dt)
}
else
{
- thumbnail = new Thumbnail(save);
+ thumbnail = SaveRenderer::Ref().Render(save->GetData(), save->GetDataLength());
}
if(thumbnail && thumbnail->Data)
{