This commit is contained in:
Kovid Goyal 2023-01-01 12:44:51 +05:30
parent d694f48c91
commit efdfaaec30
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -73,6 +73,7 @@ func transmit_shm(imgd *image_data, frame_num int, frame *image_frame) (err erro
return fmt.Errorf("Failed to create a SHM file for transmission: %w", err) return fmt.Errorf("Failed to create a SHM file for transmission: %w", err)
} }
defer mmap.Close() defer mmap.Close()
copy(mmap.Slice(), frame.in_memory_bytes)
} }
gc := gc_for_image(imgd, frame_num, frame) gc := gc_for_image(imgd, frame_num, frame)
gc.SetTransmission(graphics.GRT_transmission_sharedmem) gc.SetTransmission(graphics.GRT_transmission_sharedmem)