ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | LICENSE

Commit: 6282bf7c9cb4b8694f95e5636140ab123d2498ab
Parent: 67d21780192c5a07d15baeceaa9535746d2e20b8
Author: Randy Palamar
Date:   Tue, 12 Nov 2024 20:37:05 -0700

helper lib: win32: fix cast from iptr to actual pointer

also use the correct variable name

Diffstat:
Mhelpers/ogl_beamformer_lib.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/helpers/ogl_beamformer_lib.c b/helpers/ogl_beamformer_lib.c @@ -136,7 +136,7 @@ static b32 os_read_pipe(Pipe p, void *buf, size read_size) { i32 total_read = 0; - ReadFile(p.file, buf, len, &total_read, 0); + ReadFile(p.file, buf, read_size, &total_read, 0); return total_read == read_size; } @@ -163,7 +163,8 @@ os_open_shared_memory_area(char *name) return 0; BeamformerParametersFull *new; - new = MapViewOfFile(h, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(*new)); + iptr view = MapViewOfFile(h, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(*new)); + new = (BeamformerParametersFull *)view; CloseHandle(h); return new;