Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions vlib/sokol/c/sokol_v_post.c
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
// This implementation belongs to the native owner in a cached build.
#include "sokol_v.post.h"

#if defined(SOKOL_APP_INCLUDED) && defined(SOKOL_APP_IMPL)
SOKOL_APP_API_DECL void* v_sapp_win32_get_hwnd(void) {
return (void*) sapp_win32_get_hwnd();
}
#endif
1 change: 1 addition & 0 deletions vlib/sokol/c/sokol_v_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#if defined(SOKOL_APP_INCLUDED)
SOKOL_APP_API_DECL void v_sapp_get_environment(sapp_environment* out_env);
SOKOL_APP_API_DECL void v_sapp_get_swapchain(sapp_swapchain* out_swapchain);
SOKOL_APP_API_DECL void* v_sapp_win32_get_hwnd(void);
#endif
int v_sapp_read_rgba_pixels(int x, int y, int width, int height, unsigned char* pixels);

Expand Down
2 changes: 1 addition & 1 deletion vlib/sokol/sapp/sapp.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ pub fn ios_get_window() voidptr {
// Win32: get the HWND window handle
@[inline]
pub fn win32_get_hwnd() voidptr {
return voidptr(C.sapp_win32_get_hwnd())
return C.v_sapp_win32_get_hwnd()
}

// GL: get framebuffer object
Expand Down
2 changes: 1 addition & 1 deletion vlib/sokol/sapp/sapp_funcs.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ fn C.sapp_ios_get_window() voidptr
fn C.sapp_d3d11_get_swap_chain() voidptr

// Win32: get the HWND window handle
fn C.sapp_win32_get_hwnd() voidptr
fn C.v_sapp_win32_get_hwnd() voidptr

// GL: get major version
fn C.sapp_gl_get_major_version() i32
Expand Down