瀏覽代碼

Merge pull request #299 from reboot/fix_creating_flipped_textures

Fix creating textures from image data with flipping
Jim 11 年之前
父節點
當前提交
4e61dd93c5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libobs/graphics/graphics.c

+ 1 - 1
libobs/graphics/graphics.c

@@ -891,7 +891,7 @@ void gs_texture_set_image(gs_texture_t *tex, const uint8_t *data,
 	if (flip) {
 		for (y = height-1; y >= 0; y--)
 			memcpy(ptr  + (uint32_t)y * linesize_out,
-			       data + (uint32_t)y * linesize,
+			       data + (uint32_t)(height - y - 1) * linesize,
 			       row_copy);
 
 	} else if (linesize == linesize_out) {