From 1716e8dd04727322a0b6e0015cb5098946a9105b Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 4 Apr 2021 18:05:01 +0300 Subject: [PATCH] gg: byteptr fixes --- vlib/gg/gg.v | 2 +- vlib/sokol/sapp/sapp_structs.v | 40 +++++++++++++++++----------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/vlib/gg/gg.v b/vlib/gg/gg.v index f5b4f7fa4a..d37cb0d624 100644 --- a/vlib/gg/gg.v +++ b/vlib/gg/gg.v @@ -297,7 +297,7 @@ fn gg_cleanup_fn(user_data voidptr) { } } -fn gg_fail_fn(msg charptr, user_data voidptr) { +fn gg_fail_fn(msg &char, user_data voidptr) { mut g := unsafe { &Context(user_data) } vmsg := unsafe { tos3(msg) } if g.config.fail_fn != voidptr(0) { diff --git a/vlib/sokol/sapp/sapp_structs.v b/vlib/sokol/sapp/sapp_structs.v index 649fc4caff..594f1c5873 100644 --- a/vlib/sokol/sapp/sapp_structs.v +++ b/vlib/sokol/sapp/sapp_structs.v @@ -6,31 +6,31 @@ pub: frame_cb fn () cleanup_cb fn () event_cb fn (&C.sapp_event) //&sapp_event) - fail_cb fn (byteptr) + fail_cb fn (&byte) user_data voidptr // these are the user-provided callbacks with user data init_userdata_cb fn (voidptr) frame_userdata_cb fn (voidptr) cleanup_userdata_cb fn (voidptr) event_userdata_cb fn (&C.sapp_event, voidptr) - fail_userdata_cb fn (byteptr, voidptr) - width int // the preferred width of the window / canvas - height int // the preferred height of the window / canvas - sample_count int // MSAA sample count - swap_interval int // the preferred swap interval (ignored on some platforms) - high_dpi bool // whether the rendering canvas is full-resolution on HighDPI displays - fullscreen bool // whether the window should be created in fullscreen mode - alpha bool // whether the framebuffer should have an alpha channel (ignored on some platforms) - window_title byteptr // the window title as UTF-8 encoded string - user_cursor bool // if true, user is expected to manage cursor image in SAPP_EVENTTYPE_UPDATE_CURSOR - enable_clipboard bool // enable clipboard access, default is false - clipboard_size int // max size of clipboard content in bytes - html5_canvas_name byteptr // the name (id) of the HTML5 canvas element, default is "canvas" - html5_canvas_resize bool // if true, the HTML5 canvas size is set to sapp_desc.width/height, otherwise canvas size is tracked - html5_preserve_drawing_buffer bool // HTML5 only: whether to preserve default framebuffer content between frames - html5_premultiplied_alpha bool // HTML5 only: whether the rendered pixels use premultiplied alpha convention - html5_ask_leave_site bool // initial state of the internal html5_ask_leave_site flag (see sapp_html5_ask_leave_site()) - ios_keyboard_resizes_canvas bool // if true, showing the iOS keyboard shrinks the canvas - gl_force_gles2 bool // if true, setup GLES2/WebGL even if GLES3/WebGL2 is available + fail_userdata_cb fn (&char, voidptr) + width int // the preferred width of the window / canvas + height int // the preferred height of the window / canvas + sample_count int // MSAA sample count + swap_interval int // the preferred swap interval (ignored on some platforms) + high_dpi bool // whether the rendering canvas is full-resolution on HighDPI displays + fullscreen bool // whether the window should be created in fullscreen mode + alpha bool // whether the framebuffer should have an alpha channel (ignored on some platforms) + window_title &byte // the window title as UTF-8 encoded string + user_cursor bool // if true, user is expected to manage cursor image in SAPP_EVENTTYPE_UPDATE_CURSOR + enable_clipboard bool // enable clipboard access, default is false + clipboard_size int // max size of clipboard content in bytes + html5_canvas_name &byte // the name (id) of the HTML5 canvas element, default is "canvas" + html5_canvas_resize bool // if true, the HTML5 canvas size is set to sapp_desc.width/height, otherwise canvas size is tracked + html5_preserve_drawing_buffer bool // HTML5 only: whether to preserve default framebuffer content between frames + html5_premultiplied_alpha bool // HTML5 only: whether the rendered pixels use premultiplied alpha convention + html5_ask_leave_site bool // initial state of the internal html5_ask_leave_site flag (see sapp_html5_ask_leave_site()) + ios_keyboard_resizes_canvas bool // if true, showing the iOS keyboard shrinks the canvas + gl_force_gles2 bool // if true, setup GLES2/WebGL even if GLES3/WebGL2 is available native_render bool }