mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 10:49:59 +01:00
New CountVisitor to count the number of sources in session
Session size is the number of elements, use CountVisitor to count the total number of sources inside (recursively through SessionSources).
This commit is contained in:
@@ -165,7 +165,7 @@ void SessionSource::update(float dt)
|
||||
if (session_->failedSource() != nullptr) {
|
||||
session_->deleteSource(session_->failedSource());
|
||||
// fail session if all sources failed
|
||||
if ( session_->numSource() < 1)
|
||||
if ( session_->size() < 1)
|
||||
failed_ = true;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ void SessionFileSource::init()
|
||||
attach(renderbuffer);
|
||||
|
||||
// wait for all sources to init
|
||||
if (session_->numSource() > 0)
|
||||
if (session_->size() > 0)
|
||||
wait_for_sources_ = true;
|
||||
else {
|
||||
initialized_ = true;
|
||||
|
||||
Reference in New Issue
Block a user