gg: expose sapp_desc.swap_interval via gg.Config (#11975)

pull/11979/head
Larpon 2021-09-25 14:06:56 +02:00 committed by GitHub
parent 956fdffd96
commit 970768288d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -198,6 +198,7 @@ pub fn new_context(cfg Config) &Context {
enable_dragndrop: cfg.enable_dragndrop
max_dropped_files: cfg.max_dropped_files
max_dropped_file_path_length: cfg.max_dropped_file_path_length
swap_interval: cfg.swap_interval
}
g.window = window
return g

View File

@ -63,9 +63,10 @@ pub:
resized_fn FNEvent = voidptr(0)
scroll_fn FNEvent = voidptr(0)
// wait_events bool // set this to true for UIs, to save power
fullscreen bool
scale f32 = 1.0
sample_count int
fullscreen bool
scale f32 = 1.0
sample_count int
swap_interval int = 1 // 1 = 60fps, 2 = 30fps etc. The preferred swap interval (ignored on some platforms)
// ved needs this
// init_text bool
font_path string