Skip to content

Commit 26a11bb

Browse files
authored
Merge pull request #35 from Off-World-Live/fix/Multiview
remove active attribute to enable Multiview rendering #15 #17
2 parents 651d58e + 2051b72 commit 26a11bb

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

source/win-spout-source.cpp

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ struct spout_source {
4343
int width;
4444
int height;
4545
bool initialized;
46-
bool active;
4746
ULONGLONG tick_speed_limit;
4847
ULONGLONG composite_mode;
4948
int spout_status;
@@ -218,7 +217,6 @@ static void *win_spout_source_create(obs_data_t *settings, obs_source_t *source)
218217
context->tick_speed_limit = 0;
219218
context->texture = NULL;
220219
context->dxHandle = NULL;
221-
context->active = false;
222220
context->initialized = false;
223221

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

279-
if (!context->active) {
280-
if (context->render_status != -1) {
281-
debug("inactive");
282-
context->render_status = -1;
283-
}
284-
return;
285-
}
286-
287277
// tried to initialise again
288278
// but failed, so we exit
289279
if (!context->initialized) {
290-
if (context->render_status != -2) {
280+
if (context->render_status != -1) {
291281
debug("uninit'd");
292-
context->render_status = -2;
282+
context->render_status = -1;
293283
}
294284
return;
295285
}
296286

297287
if (!context->texture) {
298-
if (context->render_status != -3) {
288+
if (context->render_status != -2) {
299289
debug("no texture");
300-
context->render_status = -3;
290+
context->render_status = -2;
301291
}
302292
return;
303293
}
@@ -357,7 +347,6 @@ static void win_spout_source_tick(void *data, float seconds)
357347

358348
struct spout_source *context = (spout_source *)data;
359349

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

0 commit comments

Comments
 (0)