Commit 40af2040 authored by abmyii's avatar abmyii
Browse files

Add mirroring via Qt

parent 7bd314b8
......@@ -77,7 +77,7 @@ struct libevdev_uinput *uidev;
int maxx, maxy;
bool landscape = false;
bool mirror = false;
bool mirror = true;
float scale_factor;
int orientation;
......@@ -100,7 +100,11 @@ void read_pixels(int bpp, GLenum format, mir::geometry::Size const& size, void*
QImage image(width, height, QImage::Format_RGBA8888);
glReadPixels(0, 0, width, height, format, GL_UNSIGNED_BYTE, image.bits());
// Mirror image (
if (mirror)
image = image.mirrored(true, true);
// Copy image data to FB (
memcpy(fb, image.bits(), image.byteCount());
#ifdef DEBUG
unsigned int sum = 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment