1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

sokol.sapp: fix compilation of gg apps with -prod (add typedef tags to Sokol's C struct declarations)

This commit is contained in:
Delyan Angelov 2022-10-02 12:10:03 +03:00
parent 35368b5721
commit ed2960a20e
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -7,6 +7,7 @@ const (
max_iconimages = 8
)
[typedef]
pub struct C.sapp_range {
pub:
ptr voidptr
@ -15,6 +16,7 @@ pub:
pub type Range = C.sapp_range
[typedef]
pub struct C.sapp_image_desc {
pub:
width int
@ -24,6 +26,7 @@ pub:
pub type ImageDesc = C.sapp_image_desc
[typedef]
pub struct C.sapp_icon_desc {
sokol_default bool
images [max_iconimages]ImageDesc
@ -31,6 +34,7 @@ pub struct C.sapp_icon_desc {
pub type IconDesc = C.sapp_icon_desc
[typedef]
pub struct C.sapp_desc {
pub:
init_cb fn () // these are the user-provided callbacks without user data
@ -77,6 +81,7 @@ pub:
pub type Desc = C.sapp_desc
[typedef]
pub struct C.sapp_event {
pub:
frame_count u64
@ -103,10 +108,10 @@ pub:
pub type Event = C.sapp_event
pub fn (e &C.sapp_event) str() string {
t := e.@type
return 'evt: frame_count=$e.frame_count, type=$t'
return 'evt: frame_count=$e.frame_count, type=${e.@type}'
}
[typedef]
pub struct C.sapp_touchpoint {
pub:
identifier u64