[host] mingw-w64 compile fixes (#44)

* [host] rename min() to LG_MIN()

* [host] format string type fixes, %Ix doesn't exist in mingw

* [host] DXGI minor fixes

* [host] mingw lacks media foundation api headers and QISearch
This commit is contained in:
arcnmx
2018-01-30 05:07:46 -05:00
committed by Geoffrey McRae
parent d7321d5f5f
commit 35b4d75eea
6 changed files with 48 additions and 29 deletions

View File

@@ -25,8 +25,10 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "common/debug.h"
#if __MINGW32__
#define min(a, b) ((a) < (b) ? (a) : (b))
#if !defined(min)
#define LG_MIN(a, b) ((a) < (b) ? (a) : (b))
#else
#define LG_MIN min
#endif
#if __MINGW32__
@@ -57,7 +59,7 @@ public:
if (buffer[i] == '\n' || buffer[i] == '\r')
buffer[i] = 0;
fprintf(stderr, "[E] %20s:%-4u | %-30s | %s: 0x%08x (%s)\n", file, line, function, desc, status, buffer);
fprintf(stderr, "[E] %20s:%-4u | %-30s | %s: 0x%08x (%s)\n", file, line, function, desc, (int)status, buffer);
LocalFree(buffer);
}