mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: byte => u8
This commit is contained in:
@ -14,7 +14,7 @@ pub fn screenshot_window() &Screenshot {
|
||||
img_width := width()
|
||||
img_height := height()
|
||||
img_size := img_width * img_height * 4
|
||||
img_pixels := unsafe { &byte(malloc(img_size)) }
|
||||
img_pixels := unsafe { &u8(malloc(img_size)) }
|
||||
C.v_sapp_gl_read_rgba_pixels(0, 0, img_width, img_height, img_pixels)
|
||||
return &Screenshot{
|
||||
width: img_width
|
||||
@ -29,7 +29,7 @@ pub fn screenshot_window() &Screenshot {
|
||||
pub fn (mut ss Screenshot) free() {
|
||||
unsafe {
|
||||
free(ss.pixels)
|
||||
ss.pixels = &byte(0)
|
||||
ss.pixels = &u8(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user