From f7b1bfa0a86d460e8feabe6314a3c9bba501b49a Mon Sep 17 00:00:00 2001 From: Timo R Date: Thu, 10 Jul 2014 01:13:51 +0200 Subject: [PATCH] Reverse swap red&blue logic --- plugins/linux-xcomposite/xcompcap-main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/linux-xcomposite/xcompcap-main.cpp b/plugins/linux-xcomposite/xcompcap-main.cpp index fe9d0a6d8..1ad665672 100644 --- a/plugins/linux-xcomposite/xcompcap-main.cpp +++ b/plugins/linux-xcomposite/xcompcap-main.cpp @@ -308,9 +308,9 @@ void XCompcapMain::updateSettings(obs_data_t settings) uint8_t *texData = new uint8_t[width() * height() * 4]; for (unsigned int i = 0; i < width() * height() * 4; i += 4) { - texData[i + 0] = p->swapRedBlue ? 0xFF : 0; + texData[i + 0] = p->swapRedBlue ? 0 : 0xFF; texData[i + 1] = 0; - texData[i + 2] = p->swapRedBlue ? 0 : 0xFF; + texData[i + 2] = p->swapRedBlue ? 0xFF : 0; texData[i + 3] = 0xFF; } @@ -321,7 +321,7 @@ void XCompcapMain::updateSettings(obs_data_t settings) delete[] texData; - if (!p->swapRedBlue) { + if (p->swapRedBlue) { GLuint tex = *(GLuint*)texture_getobj(p->tex); glBindTexture(GL_TEXTURE_2D, tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED);