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 committed 2026-03-30 15:55:05 +11:00
1 parent 8709834901
commit 9171ba6115
1 file changed
+1 -1
+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);