Browse Source

Reverse swap red&blue logic

Timo R 11 years ago
parent
commit
f7b1bfa0a8
1 changed files with 3 additions and 3 deletions
  1. 3 3
      plugins/linux-xcomposite/xcompcap-main.cpp

+ 3 - 3
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);