From 5f18e763031091a34dc7e279424c2359f63e3d9c Mon Sep 17 00:00:00 2001 From: drumsetmonkey Date: Wed, 3 Feb 2016 19:29:41 -0500 Subject: Fixed screenshotting on 64bit --- include/ui.h | 14 ++++++++------ src/ui.cpp | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/ui.h b/include/ui.h index b9b9c24..8582460 100644 --- a/include/ui.h +++ b/include/ui.h @@ -55,8 +55,10 @@ public: void gotoParent(); }; -typedef unsigned long DWORD; -typedef unsigned short WORD; +typedef uint8_t BYTE; +typedef uint16_t WORD; +typedef uint32_t DWORD; +typedef int32_t LONG; typedef struct{ WORD bfType; @@ -67,14 +69,14 @@ typedef struct{ typedef struct{ DWORD biSize; //size of header in bytes - long biWidth; - long biHeight; + LONG biWidth; + LONG biHeight; WORD biPlanes; WORD biBitCount; //how many bits are in a pixel DWORD biCompression; DWORD biSizeImage; //size of image in bytes - long biXPelsPerMeter; - long biYPelsPerMeter; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; DWORD biClrUsed; //how many colors there are DWORD biClrImportant; //important colors } __attribute__ ((packed)) BITMAPINFOHEADER; diff --git a/src/ui.cpp b/src/ui.cpp index a075037..47ad435 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -910,7 +910,7 @@ namespace ui { bmfh.bfType = 0x4d42; - bmfh.bfOffBits = 0x36; + bmfh.bfOffBits = 54; bmfh.bfSize = header_size; bmfh.bfReserved1 = 0; bmfh.bfReserved2 = 0; -- cgit v1.2.3