From d954661c01d15f4cfa56e2021184629c38125ed9 Mon Sep 17 00:00:00 2001 From: Randy Jordan Date: Mon, 11 May 2026 15:46:33 -0500 Subject: [PATCH] Fix win32 --- src/win32_ci2_window.c | 14 +++++++------- tests/bin/01_ci2 | Bin 29624 -> 29624 bytes 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/win32_ci2_window.c b/src/win32_ci2_window.c index 33ca478..1c1d74f 100644 --- a/src/win32_ci2_window.c +++ b/src/win32_ci2_window.c @@ -31,14 +31,14 @@ struct CI2_Window { // Forward declaration of WndProc static LRESULT CALLBACK window_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); -ci2_bool platform_init(void) { +ci2_bool ci2_init(void) { // Nothing to do for Win32 return true; } -CI2_Window* platform_create_window(const ci2_sys_char* title, int width, int height) { +CI2_Window* ci2_create_window(const ci2_sys_char* title, int width, int height) { static ci2_bool class_registered = false; - static ci2_sys_char *ci2_window_class = L"Win32 CI2 Window Class" + static ci2_sys_char *ci2_window_class = L"Win32 CI2 Window Class"; if (!class_registered) { WNDCLASS wc = {0}; @@ -73,13 +73,13 @@ CI2_Window* platform_create_window(const ci2_sys_char* title, int width, int hei window->should_close = false; SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)window); - ShowWindow(window->hwnd, nShowCmd); + ShowWindow(window->hwnd, SW_SHOWNORMAL); UpdateWindow(window->hwnd); return window; } -ci2_bool platform_poll_events(CI2_Window* window) { +ci2_bool ci2_poll_events(CI2_Window* window) { MSG msg; while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); @@ -88,13 +88,13 @@ ci2_bool platform_poll_events(CI2_Window* window) { return !window->should_close; } -void platform_destroy_window(CI2_Window* window) { +void ci2_destroy_window(CI2_Window* window) { if (!window) return; DestroyWindow(window->hwnd); free(window); } -void platform_shutdown(void) { +void ci2_shutdown(void) { // Nothing to do } diff --git a/tests/bin/01_ci2 b/tests/bin/01_ci2 index 8d43e5fa281c41fde8b79573d63f1edef6f0fd4d..94b01798a2eadbf47dc3a6062dc93d3218b70d09 100755 GIT binary patch delta 83 zcmdn-oN>o<#tjY3B6ord3wb{`L?=AEyySpMi`K6_Rn?oPFt_P3+D?`>vJ!KaDq>_{ i;AF0FU;qR5??B3BbGDJQ9HZ^#^#R$;KuS7ft~>x-f*b1q delta 83 zcmdn-oN>o<#tjY3BBfKEU1z%8_|;~?+*@!`>qgxF&WoF;Ft_P3+Dw)_{ i;AF0FU;qR5??B3VbGDJQ9HY(V^#R$;KuS7ft~>xaZyR#}