summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser/RegionLoader.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-28 22:19:24 +0100
committerMattes D <github@xoft.cz>2014-10-28 22:19:24 +0100
commit48ac3acc84274fe8d0bf3af30fb47c6729b07147 (patch)
tree1498d5c1db60718dccbc4606d1f082a5e1f29da0 /Tools/QtBiomeVisualiser/RegionLoader.h
parentQtBiomeVisualiser: Fixed mouse zoom vs menu zoom. (diff)
downloadcuberite-48ac3acc84274fe8d0bf3af30fb47c6729b07147.tar
cuberite-48ac3acc84274fe8d0bf3af30fb47c6729b07147.tar.gz
cuberite-48ac3acc84274fe8d0bf3af30fb47c6729b07147.tar.bz2
cuberite-48ac3acc84274fe8d0bf3af30fb47c6729b07147.tar.lz
cuberite-48ac3acc84274fe8d0bf3af30fb47c6729b07147.tar.xz
cuberite-48ac3acc84274fe8d0bf3af30fb47c6729b07147.tar.zst
cuberite-48ac3acc84274fe8d0bf3af30fb47c6729b07147.zip
Diffstat (limited to 'Tools/QtBiomeVisualiser/RegionLoader.h')
-rw-r--r--Tools/QtBiomeVisualiser/RegionLoader.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tools/QtBiomeVisualiser/RegionLoader.h b/Tools/QtBiomeVisualiser/RegionLoader.h
index 5a993f5ca..6bbb4aa60 100644
--- a/Tools/QtBiomeVisualiser/RegionLoader.h
+++ b/Tools/QtBiomeVisualiser/RegionLoader.h
@@ -28,6 +28,9 @@ public:
RegionLoader(int a_RegionX, int a_RegionZ, RegionPtr a_Region, ChunkSourcePtr a_ChunkSource);
virtual ~RegionLoader() {}
+ /** Signals to all loaders that the app is shutting down and the loading should be aborted. */
+ static void shutdown() { m_IsShuttingDown = true; }
+
signals:
void loaded(int a_RegionX, int a_RegionZ);
@@ -43,6 +46,9 @@ private:
/** The chunk source to be used for individual chunks within the region. */
ChunkSourcePtr m_ChunkSource;
+
+ /** Flag that is set upon app exit to terminate the queued loaders faster. */
+ static volatile bool m_IsShuttingDown;
};