fix: await setRecordingState before muxNativeWindowsRecording

The cursor telemetry snapshot (setRecordingState(false)) was not awaited,
creating a race with muxNativeWindowsRecording which calls finalizeStoredVideo.
If the mux IPC arrived first, pendingCursorSamples was still empty and no
.cursor.json was written — causing the cursor overlay to not render.
This commit is contained in:
webadderall
2026-03-30 15:55:05 +11:00
parent e8aa5ac5ad
commit eb0ae2a324
+1 -1
View File
@@ -479,7 +479,7 @@ export function useScreenRecorder(): UseScreenRecorderReturn {
nativeWindowsRecording.current = false;
const result = await window.electronAPI.stopNativeScreenRecording();
window.electronAPI?.setRecordingState(false);
await window.electronAPI?.setRecordingState(false);
if (!result.success || !result.path) {
console.error("Failed to stop native screen recording:", result.error ?? result.message);