summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorJapa2010-09-11 10:08:00 +0000
committerJapa2010-09-11 10:08:00 +0000
commitf289538a4f71e65f4e94503631d0c0852daad518 (patch)
tree89f88a8a096aaf6b85609381485c0e16fb23e449 /main.cpp
parentf5cd4faed27242435796b21ee6ecf3599930acfd (diff)
downloadstonesense-f289538a4f71e65f4e94503631d0c0852daad518.tar.gz
stonesense-f289538a4f71e65f4e94503631d0c0852daad518.tar.bz2
stonesense-f289538a4f71e65f4e94503631d0c0852daad518.tar.xz
preliminary multithreading work. still needs stuff done to the block allocators to make things not crash.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 160a897..3f9cdac 100644
--- a/main.cpp
+++ b/main.cpp
@@ -262,6 +262,7 @@ int main(void)
config.creditScreen = true;
config.bloodcutoff = 100;
config.poolcutoff = 100;
+ config.threadmade = 0;
initRandomCube();
loadConfigFile();
loadfont();
@@ -341,6 +342,9 @@ int main(void)
//DisplayedSegmentX = 242; DisplayedSegmentY = 345;DisplayedSegmentZ = 15;
+ config.readMutex = al_create_mutex();
+ config.readCond = al_create_cond();
+
#ifdef BENCHMARK
benchmark();
#endif
@@ -424,7 +428,11 @@ int main(void)
flushImgFiles();
DisconnectFromDF();
- //dispose old segment
+ //dispose old segments
+ if(altSegment){
+ altSegment->Dispose();
+ delete(altSegment);
+ }
if(viewedSegment){
viewedSegment->Dispose();
delete(viewedSegment);