]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
Fixed screenshotting on 64bit
authordrumsetmonkey <abelleisle@roadrunner.com>
Thu, 4 Feb 2016 00:29:41 +0000 (19:29 -0500)
committerdrumsetmonkey <abelleisle@roadrunner.com>
Thu, 4 Feb 2016 00:29:41 +0000 (19:29 -0500)
include/ui.h
src/ui.cpp

index b9b9c24171209954dbff25de59774ac5d2fdc345..8582460ade15f017ce0d2f75488b857da1e8b4c6 100644 (file)
@@ -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;
index a0750378ae2cce6150f48bd7c3e76da3de71d55e..47ad4350c5355aa34486ca4999b3c64b1d37350c 100644 (file)
@@ -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;