Skip to content

Commit

Permalink
Merge pull request #35 from Off-World-Live/fix/Multiview
Browse files Browse the repository at this point in the history
remove active attribute to enable Multiview rendering #15 #17
  • Loading branch information
mzlt authored Jan 5, 2022
2 parents 651d58e + 2051b72 commit 26a11bb
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions source/win-spout-source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ struct spout_source {
int width;
int height;
bool initialized;
bool active;
ULONGLONG tick_speed_limit;
ULONGLONG composite_mode;
int spout_status;
Expand Down Expand Up @@ -218,7 +217,6 @@ static void *win_spout_source_create(obs_data_t *settings, obs_source_t *source)
context->tick_speed_limit = 0;
context->texture = NULL;
context->dxHandle = NULL;
context->active = false;
context->initialized = false;

// set the initial size as 100x100 until we
Expand Down Expand Up @@ -276,28 +274,20 @@ static void win_spout_source_render(void *data, gs_effect_t *effect)
{
struct spout_source *context = (spout_source *)data;

if (!context->active) {
if (context->render_status != -1) {
debug("inactive");
context->render_status = -1;
}
return;
}

// tried to initialise again
// but failed, so we exit
if (!context->initialized) {
if (context->render_status != -2) {
if (context->render_status != -1) {
debug("uninit'd");
context->render_status = -2;
context->render_status = -1;
}
return;
}

if (!context->texture) {
if (context->render_status != -3) {
if (context->render_status != -2) {
debug("no texture");
context->render_status = -3;
context->render_status = -2;
}
return;
}
Expand Down Expand Up @@ -357,7 +347,6 @@ static void win_spout_source_tick(void *data, float seconds)

struct spout_source *context = (spout_source *)data;

context->active = obs_source_active(context->source);
if (win_spout_sender_has_changed(context)) {
if (context->tick_status != -1) {
info("Sender %s has changed / gone away. Resetting ",
Expand Down

0 comments on commit 26a11bb

Please sign in to comment.