1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Fix X11 icon image copy

This commit is contained in:
Camilla Berglund 2016-03-11 11:45:53 +01:00
parent d998e3eebe
commit d2338f3a49

View File

@ -1554,12 +1554,12 @@ void _glfwPlatformSetWindowIcon(_GLFWwindow* window,
*target++ = images[i].width;
*target++ = images[i].height;
for (j = 0; j < images[i].width * images[i].height; i++)
for (j = 0; j < images[i].width * images[i].height; j++)
{
*target++ = (images[i].pixels[i * 4 + 0] << 16) |
(images[i].pixels[i * 4 + 1] << 8) |
(images[i].pixels[i * 4 + 2] << 0) |
(images[i].pixels[i * 4 + 3] << 24);
*target++ = (images[i].pixels[j * 4 + 0] << 16) |
(images[i].pixels[j * 4 + 1] << 8) |
(images[i].pixels[j * 4 + 2] << 0) |
(images[i].pixels[j * 4 + 3] << 24);
}
}