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

gg: cleanup the minimal gg program more

This commit is contained in:
Delyan Angelov 2021-11-07 09:16:49 +02:00
parent 32b74dd348
commit 852d85b3a9
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,6 @@ fn main() {
window_title: 'Polygons'
frame_fn: frame
)
context.user_data = context
context.run()
}

View File

@ -179,6 +179,9 @@ pub fn new_context(cfg Config) &Context {
ui_mode: cfg.ui_mode
native_rendering: cfg.native_rendering
}
if isnil(cfg.user_data) {
g.user_data = g
}
g.set_bg_color(cfg.bg_color)
// C.printf('new_context() %p\n', cfg.user_data)
window := C.sapp_desc{