summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-08-08 09:17:58 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-08-08 09:17:58 (GMT)
commitfdf4ee7c95099effa4c52319b0a2ab6af547574c (patch)
tree5b97f161a7fe09471970ea4fe00b817ab88c888f /src/main.c
parent11d3cb0dd56ddc7df49570e41c3f8f9f01d872d1 (diff)
parent39e1ffe5bf64c29e81ecf8779dfbbe41bb5173d5 (diff)
downloadpowder-fdf4ee7c95099effa4c52319b0a2ab6af547574c.zip
powder-fdf4ee7c95099effa4c52319b0a2ab6af547574c.tar.gz
Merge branch 'master' of github.com:FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 83c03d2..3a02030 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1450,6 +1450,9 @@ void* update_grav_async(void* unused)
memset(th_gravmap, 0, sizeof(th_gravmap));
memset(th_gravy, 0, sizeof(th_gravy));
memset(th_gravx, 0, sizeof(th_gravx));
+#ifdef GRAVFFT
+ grav_fft_init();
+#endif
while(!thread_done){
if(!done){
update_grav();
@@ -1476,8 +1479,6 @@ void* update_grav_async(void* unused)
void start_grav_async()
{
if(!ngrav_enable){
- /*pthread_mutexattr_t gma; //I do not know why this is here
- pthread_mutexattr_init(&gma);*/
gravthread_done = 0;
pthread_mutex_init (&gravmutex, NULL);
pthread_cond_init(&gravcv, NULL);
@@ -3617,6 +3618,9 @@ int main(int argc, char *argv[])
}
SDL_CloseAudio();
http_done();
+#ifdef GRAVFFT
+ grav_fft_cleanup();
+#endif
#ifdef LUACONSOLE
luacon_close();
#endif