mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
os: use 1 instead of C.SW_SHOWNORMAL to workaround a cross compilation issue from linux to windows
This commit is contained in:
parent
fc45c0a55b
commit
6197140085
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue