mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
User input unified and fixed for clone source
Fixed slider in player, show filtered image when disabled (outside mixing circle), correct timing for clone source (different for filters).
This commit is contained in:
@@ -26,6 +26,29 @@ DelayFilter::~DelayFilter()
|
||||
elapsed_.pop();
|
||||
}
|
||||
|
||||
void DelayFilter::reset ()
|
||||
{
|
||||
// delete all frame buffers
|
||||
while (!frames_.empty()) {
|
||||
if (frames_.front() != nullptr)
|
||||
delete frames_.front();
|
||||
frames_.pop();
|
||||
}
|
||||
|
||||
while (!elapsed_.empty())
|
||||
elapsed_.pop();
|
||||
|
||||
now_ = 0.0;
|
||||
}
|
||||
|
||||
double DelayFilter::updateTime ()
|
||||
{
|
||||
if (!elapsed_.empty())
|
||||
return elapsed_.front();
|
||||
|
||||
return 0.;
|
||||
}
|
||||
|
||||
void DelayFilter::update (float dt)
|
||||
{
|
||||
if (input_) {
|
||||
@@ -96,7 +119,7 @@ void DelayFilter::draw (FrameBuffer *input)
|
||||
{
|
||||
input_ = input;
|
||||
|
||||
if ( enabled() ) // TODO TEST DISABLE
|
||||
if ( enabled() )
|
||||
{
|
||||
// make sure the queue is not empty
|
||||
if ( input_ && !frames_.empty() ) {
|
||||
|
||||
Reference in New Issue
Block a user