mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-20 07:01:27 +02:00
Fix n-gravity toggle
This commit is contained in:
@@ -1285,6 +1285,7 @@ void stop_grav_async()
|
|||||||
if(ngrav_enable){
|
if(ngrav_enable){
|
||||||
pthread_mutex_lock(&gravmutex);
|
pthread_mutex_lock(&gravmutex);
|
||||||
gravthread_done = 1;
|
gravthread_done = 1;
|
||||||
|
pthread_cond_signal(&gravcv);
|
||||||
pthread_mutex_unlock(&gravmutex);
|
pthread_mutex_unlock(&gravmutex);
|
||||||
pthread_join(gravthread, NULL);
|
pthread_join(gravthread, NULL);
|
||||||
pthread_mutex_destroy(&gravmutex); //Destroy the mutex
|
pthread_mutex_destroy(&gravmutex); //Destroy the mutex
|
||||||
|
Reference in New Issue
Block a user