Fix win32

This commit is contained in:
2026-05-11 15:46:33 -05:00
parent 128b342c89
commit d954661c01
2 changed files with 7 additions and 7 deletions

View File

@@ -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
}

Binary file not shown.