From 619714008547b5d86b4e1fa5f6d4314cb87edef1 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 21 May 2024 19:47:04 +0300 Subject: [PATCH] os: use 1 instead of C.SW_SHOWNORMAL to workaround a cross compilation issue from linux to windows --- vlib/os/open_uri_windows.c.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlib/os/open_uri_windows.c.v b/vlib/os/open_uri_windows.c.v index 5f8d48790..cfc093ed1 100644 --- a/vlib/os/open_uri_windows.c.v +++ b/vlib/os/open_uri_windows.c.v @@ -17,6 +17,7 @@ pub fn open_uri(uri string) ! { handle := dl.open_opt('shell32', dl.rtld_now)! // https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew func := ShellExecuteWin(dl.sym_opt(handle, 'ShellExecuteW')!) - func(C.NULL, 'open'.to_wide(), uri.to_wide(), C.NULL, C.NULL, C.SW_SHOWNORMAL) + // 1 is SW_SHOWNORMAL, but it avoids including winuser.h, and in turn windows.h, which conflicts with raylib + func(C.NULL, 'open'.to_wide(), uri.to_wide(), C.NULL, C.NULL, 1) dl.close(handle) } -- 2.39.5