Fixed Win32 test: invalid function for CreateThread parameter

This commit is contained in:
REghZy 2023-12-08 22:39:17 +00:00
parent 1cbfe6be70
commit bebe6eb12a
2 changed files with 34 additions and 38 deletions

3
.gitignore vendored
View File

@ -100,6 +100,3 @@ tests/title
tests/triangle-vulkan
tests/window
tests/windows
/.idea
/cmake-build-debug
/.gitignore

View File

@ -32,7 +32,6 @@
#include <Windows.h>
#endif // USE_WIN32_THREAD_EMPTY_EVENT_TEST
#define GLAD_GL_IMPLEMENTATION
#include <glad/gl.h>
#define GLFW_INCLUDE_NONE
@ -60,7 +59,7 @@
#ifdef USE_WIN32_THREAD_EMPTY_EVENT_TEST
DWORD WINAPI win32ThreadEmptyEventTest(void)
DWORD WINAPI win32ThreadEmptyEventTest(LPVOID lpThreadParameter)
{
// Sleep for 3 seconds, and then post an empty event. The onEmptyEventPosted
// method should then be fired shortly after, on the GLFW main thread.
@ -81,7 +80,7 @@ void onEmptyEventPosted(void)
// This is the only effective way to run code on the main thread during the
// window resize phase while the user isn't moving their mouse, apart from the
// actual resize events obviously
MessageBoxExW(NULL, L"Callback event received!", L"Empty Event Callback", NULL, NULL);
MessageBoxW((HWND)NULL, L"Callback event received!", L"Empty Event Callback", (UINT)0);
// printf("Empty event received! Put a break point here, and this will be fired on the main thread");
}
@ -158,7 +157,7 @@ int main(int argc, char** argv)
glfwGetWindowSize(window, &width, &height);
struct nk_rect area = nk_rect(0.f, 0.f, (float) width, (float) height);
struct nk_rect area = nk_rect(0.f, 0.f, (float)width, (float)height);
nk_window_set_bounds(nk, "main", area);
nk_glfw3_new_frame();