mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix whitespace.
This commit is contained in:
parent
23ce5c0cdd
commit
f512b97708
@ -250,14 +250,14 @@ char *XGetScreenshot(int *w, int *h) {
|
|||||||
*h = height;
|
*h = height;
|
||||||
char *pixels = (char *)malloc(width * height * 3);
|
char *pixels = (char *)malloc(width * height * 3);
|
||||||
|
|
||||||
for (int row = 0; row < height; row++) {
|
for (int row = 0; row < height; row++) {
|
||||||
for (int col = 0; col < width; col++) {
|
for (int col = 0; col < width; col++) {
|
||||||
int pos = ((row * width) + col) * 3;
|
int pos = ((row * width) + col) * 3;
|
||||||
unsigned long pixel = XGetPixel(ximage, col, row);
|
unsigned long pixel = XGetPixel(ximage, col, row);
|
||||||
|
|
||||||
pixels[pos] = (pixel & ximage->red_mask) >> 16;
|
pixels[pos] = (pixel & ximage->red_mask) >> 16;
|
||||||
pixels[pos+1] = (pixel & ximage->green_mask) >> 8;
|
pixels[pos+1] = (pixel & ximage->green_mask) >> 8;
|
||||||
pixels[pos+2] = pixel & ximage->blue_mask;
|
pixels[pos+2] = pixel & ximage->blue_mask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user