mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 15:16:16 +00:00
Move USleep to utils/
This commit is contained in:
committed by
Corentin Wallez
parent
2fbda87caf
commit
134e08005a
@@ -16,15 +16,6 @@
|
||||
#include "utils/BackendBinding.h"
|
||||
#include "wire/TerribleCommandBuffer.h"
|
||||
|
||||
// Include Windows.h before GLFW to avoid a redefinition of APIENTRY
|
||||
#if defined(NXT_PLATFORM_WINDOWS)
|
||||
#include <Windows.h>
|
||||
#elif defined(NXT_PLATFORM_POSIX)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#error "Unsupported platform."
|
||||
#endif
|
||||
|
||||
#include <nxt/nxt.h>
|
||||
#include <nxt/nxtcpp.h>
|
||||
#include "GLFW/glfw3.h"
|
||||
@@ -179,18 +170,6 @@ void DoSwapBuffers() {
|
||||
binding->SwapBuffers();
|
||||
}
|
||||
|
||||
#if defined(NXT_PLATFORM_WINDOWS)
|
||||
void USleep(uint64_t usecs) {
|
||||
Sleep(static_cast<DWORD>(usecs / 1000));
|
||||
}
|
||||
#elif defined(NXT_PLATFORM_POSIX)
|
||||
void USleep(uint64_t usecs) {
|
||||
usleep(usecs);
|
||||
}
|
||||
#else
|
||||
#error "Implement USleep for your platform."
|
||||
#endif
|
||||
|
||||
bool ShouldQuit() {
|
||||
return glfwWindowShouldClose(window);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user