mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-27 04:28:52 -05:00
Fix X11 icon image copy
This commit is contained in:
parent
d998e3eebe
commit
d2338f3a49
|
@ -1554,12 +1554,12 @@ void _glfwPlatformSetWindowIcon(_GLFWwindow* window,
|
||||||
*target++ = images[i].width;
|
*target++ = images[i].width;
|
||||||
*target++ = images[i].height;
|
*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) |
|
*target++ = (images[i].pixels[j * 4 + 0] << 16) |
|
||||||
(images[i].pixels[i * 4 + 1] << 8) |
|
(images[i].pixels[j * 4 + 1] << 8) |
|
||||||
(images[i].pixels[i * 4 + 2] << 0) |
|
(images[i].pixels[j * 4 + 2] << 0) |
|
||||||
(images[i].pixels[i * 4 + 3] << 24);
|
(images[i].pixels[j * 4 + 3] << 24);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user