mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-16 22:08:28 +01:00
Only dispatch the gravity thread if there is work to be done
The definition of when there is work to be done is more or less "when the input to the gravity process has changed"; this is about to be extended to cover some other situations by the next commit.
This commit is contained in:
parent
6b5bbb177d
commit
fb7ae9fc63
@ -232,9 +232,8 @@ void Gravity::Exchange(GravityOutput &gravOut, GravityInput &gravIn)
|
||||
{
|
||||
fftGravity->copyGravOut = true;
|
||||
std::swap(gravIn, fftGravity->gravIn);
|
||||
fftGravity->Dispatch();
|
||||
}
|
||||
|
||||
fftGravity->Dispatch();
|
||||
}
|
||||
|
||||
GravityPtr Gravity::Create()
|
||||
|
Loading…
x
Reference in New Issue
Block a user