MSVC compilation fixes
This commit is contained in:
+6
-3
@@ -75,9 +75,12 @@
|
||||
#define GET_BLUE(color) \
|
||||
(((color) & 0x001F) << 3)
|
||||
|
||||
// remove windows default definitions
|
||||
#undef OPAQUE
|
||||
#undef RGB
|
||||
#ifndef __GNUC__
|
||||
#include <windows.h>
|
||||
// remove windows default definitions
|
||||
#undef OPAQUE
|
||||
#undef RGB
|
||||
#endif
|
||||
|
||||
#define OPACITY_MAX 0x0F
|
||||
#define OPACITY(x) ((x)<<24)
|
||||
|
||||
+6
-1
@@ -22,6 +22,11 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#if defined(min)
|
||||
#undef min
|
||||
#undef max
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
inline T min(T a, T b)
|
||||
{
|
||||
@@ -51,7 +56,7 @@ inline int divRoundClosest(const int n, const int d)
|
||||
inline std::string TEXT_AT_INDEX(const char * val, uint8_t idx)
|
||||
{
|
||||
const char * start = val + 1 + idx * val[0];
|
||||
return std::string(start, min<uint8_t>(val[0], strlen(start)));
|
||||
return std::string(start, min<uint8_t>(val[0], (uint8_t)strlen(start)));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+5
@@ -33,6 +33,11 @@
|
||||
|
||||
typedef uint32_t WindowFlags;
|
||||
|
||||
#if !defined(_GNUC_)
|
||||
#undef OPAQUE
|
||||
#undef TRANSPARENT
|
||||
#endif
|
||||
|
||||
constexpr WindowFlags OPAQUE = 1 << 0;
|
||||
constexpr WindowFlags TRANSPARENT = 1 << 1;
|
||||
constexpr WindowFlags NO_SCROLLBAR = 1 << 2;
|
||||
|
||||
Reference in New Issue
Block a user