mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 15:16:16 +00:00
Fix all Windows warnings
This commit is contained in:
committed by
Corentin Wallez
parent
8fca4a21b7
commit
83e779d8f2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user