Skip to content

Commit

Permalink
Always Invalidate & Recompute on first load
Browse files Browse the repository at this point in the history
- Reported by JoneyMacaroney and JLPG.
  • Loading branch information
latenitefilms committed Sep 6, 2023
1 parent b84b1f4 commit 0d90701
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Source/Frameworks/gyroflow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,11 @@ pub extern "C" fn processFrame(
Mutex::new(logger)
});

//---------------------------------------------------------
// Have parameters changed:
//---------------------------------------------------------
let mut params_changed = false;

//---------------------------------------------------------
// Get the Unique Identifier:
//---------------------------------------------------------
Expand Down Expand Up @@ -903,6 +908,11 @@ pub extern "C" fn processFrame(
//---------------------------------------------------------
manager.clone()
} else {
//---------------------------------------------------------
// On first load, always Invalidate & Recompute:
//---------------------------------------------------------
params_changed = true;

//---------------------------------------------------------
// Setup the Gyroflow Manager:
//---------------------------------------------------------
Expand Down Expand Up @@ -974,10 +984,6 @@ pub extern "C" fn processFrame(
cache.get(&cache_key).unwrap().clone()
};

//---------------------------------------------------------
// Have parameters changed:
//---------------------------------------------------------
let mut params_changed = false;
{
let mut params = manager.params.write();

Expand Down

0 comments on commit 0d90701

Please sign in to comment.