From 18a50b745dad0d22c5de92c78487e477504e6894 Mon Sep 17 00:00:00 2001 From: Alek-ban Date: Fri, 19 Dec 2025 09:32:12 +0300 Subject: [PATCH] fix: typo in CameraService --- GSS2.Core/Hardware/CameraService.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/GSS2.Core/Hardware/CameraService.cs b/GSS2.Core/Hardware/CameraService.cs index 908eb4b..6ff29ed 100644 --- a/GSS2.Core/Hardware/CameraService.cs +++ b/GSS2.Core/Hardware/CameraService.cs @@ -13,7 +13,7 @@ public class CameraService : IDisposable public const int MAP_SHARED = 0x0001; [DllImport("libc", SetLastError = true)] public static extern IntPtr mmap(IntPtr address, ulong length, int prot, int flags, int fd, ulong offset); - [DllImport("libc", SetLastError = true)] public static extern int mumap(IntPtr address, ulong length); + [DllImport("libc", SetLastError = true)] public static extern int munmap(IntPtr address, ulong length); } private sealed class MappedBuffer { @@ -115,9 +115,9 @@ public class CameraService : IDisposable CameraSelect(effectiveCancellationToken); CameraAcquire(effectiveCancellationToken); CameraConfigure(effectiveCancellationToken); - CameraStart(effectiveCancellationToken); FrameBuffersAllocate(effectiveCancellationToken); ImageCaptureFrameBuffersMap(effectiveCancellationToken); + CameraStart(effectiveCancellationToken); } catch (Exception e) { @@ -244,7 +244,6 @@ public class CameraService : IDisposable _frameBufferAllocator = new FrameBufferAllocator(_camera); - cancellationToken.ThrowIfCancellationRequested(); int result = _frameBufferAllocator.Allocate(_viewFinderStream); @@ -443,7 +442,7 @@ public class CameraService : IDisposable if (_state.HasFlag(State.ImageCaptureFrameBuffersMapped) && _mappedBuffers is not null) { foreach (var buffer in _mappedBuffers) - LibC.mumap(buffer.Address, buffer.Length); + LibC.munmap(buffer.Address, buffer.Length); _mappedBuffers.Clear(); } if (_state.HasFlag(State.ViewFinderFrameBufferAllocated) && _viewFinderStream is not null)