mirror of
https://github.com/siddharthvaddem/openscreen.git
synced 2026-08-30 17:06:13 +08:00
Merge pull request #681 from jodelcioluz/fix-cursor-telemetry
fix: resolve cursor-sampler telemetry not working
This commit is contained in:
@@ -22,10 +22,14 @@ function getCursorSamplerCandidates(): string[] {
|
||||
const p = join(app.getAppPath(), ...segs);
|
||||
return app.isPackaged ? p.replace(/\.asar([/\\])/, ".asar.unpacked$1") : p;
|
||||
};
|
||||
const resolvePackaged = (...segs: string[]) => {
|
||||
return app.isPackaged ? join(process.resourcesPath, ...segs) : null;
|
||||
};
|
||||
return [
|
||||
envPath,
|
||||
resolve("electron", "native", "wgc-capture", "build", "cursor-sampler.exe"),
|
||||
resolve("electron", "native", "bin", archTag, "cursor-sampler.exe"),
|
||||
resolvePackaged("electron", "native", "bin", archTag, "cursor-sampler.exe"),
|
||||
].filter((c): c is string => Boolean(c));
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ target_compile_definitions(wgc-capture PRIVATE
|
||||
_WIN32_WINNT=0x0A00
|
||||
)
|
||||
|
||||
target_compile_options(wgc-capture PRIVATE /EHsc /W4 /utf-8)
|
||||
target_compile_options(wgc-capture PRIVATE /EHsc /W4 /utf-8 /await)
|
||||
|
||||
target_link_libraries(wgc-capture PRIVATE
|
||||
d3d11
|
||||
|
||||
@@ -632,8 +632,8 @@ int main(int argc, char* argv[]) {
|
||||
(webcamOutputFrameIndex * 10'000'000ULL) / std::max(1, webcamCapture.fps()));
|
||||
if (!webcamEncoder.writeBgraFrame(webcamFrame, webcamTimestampHns)) {
|
||||
encodeFailed = true;
|
||||
stopRequested = true;
|
||||
cv.notify_all();
|
||||
control.stopRequested = true;
|
||||
control.cv.notify_all();
|
||||
return;
|
||||
}
|
||||
lastWrittenWebcamSequence = latestWebcamSequence;
|
||||
|
||||
Reference in New Issue
Block a user