Skip to content

Commit 7e9691a

Browse files
committed
Fix building on old Emscripten version without SDL_GetTicks64
1 parent e3e98d6 commit 7e9691a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

source/ham/recolor.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <string.h>
33
#include <algorithm>
44
#include <SDL_timer.h>
5+
#include <SDL_version.h>
56

67
// ----------------------------------------------------------------------------
78
// Basic color manipulation
@@ -139,6 +140,10 @@ void Recolor::SetMode(Hue hue, Mode mode)
139140
hueAndMode[hue] = (hueAndMode[hue] & HUE_MASK) | ((byte)mode << HUE_BITS);
140141
}
141142

143+
#if !SDL_VERSION_ATLEAST(2, 0, 18)
144+
#define SDL_GetTicks64 SDL_GetTicks
145+
#endif
146+
142147
byte Recolor::Apply(byte color, byte underlying)
143148
{
144149
byte hue = hueAndMode[color >> 5] & HUE_MASK;

0 commit comments

Comments
 (0)