Fix all Windows warnings

This commit is contained in:
Corentin Wallez
2017-07-10 21:44:06 -04:00
committed by Corentin Wallez
parent 8fca4a21b7
commit 83e779d8f2
22 changed files with 99 additions and 96 deletions

View File

@@ -15,6 +15,13 @@
#include "utils/BackendBinding.h"
#include "../src/wire/TerribleCommandBuffer.h"
// Include Windows.h before GLFW to avoid a redefinition of APIENTRY
#ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
#include <nxt/nxt.h>
#include <nxt/nxtcpp.h>
#include "GLFW/glfw3.h"
@@ -22,12 +29,6 @@
#include <cstring>
#include <iostream>
#ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
void PrintDeviceError(const char* message, nxt::CallbackUserdata) {
std::cout << "Device error: " << message << std::endl;
}
@@ -171,7 +172,7 @@ void DoSwapBuffers() {
#ifdef _WIN32
void USleep(uint64_t usecs) {
Sleep(usecs / 1000);
Sleep(static_cast<DWORD>(usecs / 1000));
}
#else
void USleep(uint64_t usecs) {