mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-18 05:39:59 +01:00
New Reload source function
Generalize the reload of stream source to all types of sources. Enable OSC command to reload source.
This commit is contained in:
@@ -277,10 +277,14 @@ void SessionFileSource::load(const std::string &p, uint level)
|
||||
path_ = p;
|
||||
|
||||
// delete session
|
||||
if (session_) {
|
||||
if (session_)
|
||||
delete session_;
|
||||
session_ = nullptr;
|
||||
}
|
||||
session_ = nullptr;
|
||||
|
||||
// reset renderbuffer_
|
||||
if (renderbuffer_)
|
||||
delete renderbuffer_;
|
||||
renderbuffer_ = nullptr;
|
||||
|
||||
// init session
|
||||
if ( path_.empty() ) {
|
||||
@@ -299,6 +303,11 @@ void SessionFileSource::load(const std::string &p, uint level)
|
||||
ready_ = false;
|
||||
}
|
||||
|
||||
void SessionFileSource::reload()
|
||||
{
|
||||
load(path_);
|
||||
}
|
||||
|
||||
void SessionFileSource::init()
|
||||
{
|
||||
// init is first about getting the loaded session
|
||||
|
||||
Reference in New Issue
Block a user