diff --git a/source/src/main.cpp b/source/src/main.cpp index 3493f489..06466ab0 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -51,8 +51,9 @@ void screenshot(char *imagepath) uchar *dst = (uchar *)image->pixels; loopi(scr_h) { - memcpy(dst, &tmp[3*scr_w*i], 3*scr_w); + memcpy(dst, &tmp[3*scr_w*(scr_h-i-1)], 3*scr_w); endianswap(dst, 3, scr_w); + dst += image->pitch; } delete[] tmp; if(!imagepath[0])