Fix some compilations problems in MinGW

Anyway without DirectX header files (ddraw.h specifically) we cannot
compile Allegro source code with MinGW.
This commit is contained in:
David Capello 2013-12-22 12:20:53 -03:00
parent 85523ba63a
commit c3e583f927
4 changed files with 6 additions and 2 deletions

View File

@ -29,7 +29,9 @@
/* a static auto config */
/* older mingw's don't seem to have inttypes.h */
/* #define ALLEGRO_HAVE_INTTYPES_H */
#ifndef ALLEGRO_HAVE_STDINT_H
#define ALLEGRO_HAVE_STDINT_H 1
#endif
/* describe this platform */

View File

@ -24,6 +24,7 @@
#include <iosfwd>
#include <vector>
#include <string>
namespace raster {
class Image;

View File

@ -36,7 +36,7 @@
#ifdef ALLEGRO_WINDOWS
#include <winalleg.h>
#ifdef STRICT
#if defined STRICT || defined __GNUC__
typedef WNDPROC wndproc_t;
#else
typedef FARPROC wndproc_t;

View File

@ -51,6 +51,7 @@
#include "ui/ui.h"
#include <allegro.h>
#include <cstdio>
#include <vector>
// Size of the thumbnail in the screen (width x height), the really
@ -1108,7 +1109,7 @@ void Timeline::drawHeaderFrame(ui::Graphics* g, FrameNumber frame)
// Draw the header for the layers.
char buf[256];
sprintf(buf, "%d", frame+1);
std::sprintf(buf, "%d", frame+1);
drawPart(g, bounds, buf, m_timelineBoxStyle,
is_active, is_hover, is_clicked);
}