Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(app): address CodeRabbit review on the Save Diagnostics PR

EtienneLescot80e940f982c5
diff --git a/electron/main.ts b/electron/main.ts
index 6f2538587..a85629bf3 100644
--- a/electron/main.ts
+++ b/electron/main.ts
@@ -549,7 +549,23 @@ function runUpdateCheck() {
function runSaveDiagnostics() {
exportDiagnosticFile({ error: "Manual diagnostic export", projectState: null, logs: [] })
.then((result) => {
- if (result.success && result.path) {
+ if (result.canceled) return;
+ if (!result.success) {
+ // exportDiagnosticFile resolves rather than rejects on a write
+ // failure, so this is the branch that turns "user picked a save
+ // location and got silence" into a visible error instead of a
+ // menu action that looks like it did nothing.
+ showMessageBox({
+ type: "error",
+ title: PRODUCT_NAME,
+ message: mainT("dialogs", "export.failed") || "Export Failed",
+ detail: result.error,
+ }).catch((error) => {
+ console.error("[diagnostics] failure dialog failed", error);
+ });
+ return;
+ }
+ if (result.path) {
shell.showItemInFolder(result.path);
}
})
diff --git a/electron/native/wgc-capture/src/mf_encoder.cpp b/electron/native/wgc-capture/src/mf_encoder.cpp
index c1e5c2bbe..4130b1326 100644
--- a/electron/native/wgc-capture/src/mf_encoder.cpp
+++ b/electron/native/wgc-capture/src/mf_encoder.cpp
@@ -406,16 +406,17 @@ bool resolveStreamSinkIndex(IMFMediaSink* mediaSink, const GUID& majorType, DWOR
// Did the video stream's encoder MFT actually land on hardware?
//
-// BeginWriting() succeeding says nothing about this: on the "default" path
-// (see kVideoEncoderRuntime* in mf_encoder.h) no attribute asked for hardware
-// transforms, so Media Foundation is free to hand the sink writer a software
-// MFT even when a hardware one is registered and would have worked. The only
-// way to know which one it actually picked is to ask the pipeline it built,
-// after the fact -- IMFSinkWriterEx::GetTransformForStream walks the MFTs the
-// sink writer inserted for a stream, and a hardware MFT instance is required
-// to expose MFT_ENUM_HARDWARE_URL_Attribute on its own attribute store (not
-// just on the IMFActivate MFTEnumEx returns), which is what distinguishes it
-// from a software one at this point.
+// BeginWriting() succeeding says nothing about this: even on the "default"
+// path (see kVideoEncoderRuntime* in mf_encoder.h), which does now ask for
+// MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, that is a request and not a
+// guarantee -- Media Foundation is still free to hand the sink writer a
+// software MFT when no hardware one is registered or the driver refuses it.
+// The only way to know which one it actually picked is to ask the pipeline it
+// built, after the fact -- IMFSinkWriterEx::GetTransformForStream walks the
+// MFTs the sink writer inserted for a stream, and a hardware MFT instance is
+// required to expose MFT_ENUM_HARDWARE_URL_Attribute on its own attribute
+// store (not just on the IMFActivate MFTEnumEx returns), which is what
+// distinguishes it from a software one at this point.
//
// Every failure path here returns "unknown" rather than guessing: this runs
// after the sink writer is already committed to, so it must never be able to
diff --git a/src/i18n/locales/ko-KR/common.json b/src/i18n/locales/ko-KR/common.json
index 2ca4d25a5..98d025d9a 100644
--- a/src/i18n/locales/ko-KR/common.json
+++ b/src/i18n/locales/ko-KR/common.json
@@ -41,7 +41,7 @@
"hide": "OpenScreen 숨기기",
"hideOthers": "다른 항목 숨기기",
"unhide": "모두 보기",
- "saveDiagnostics": "Save Diagnostics"
+ "saveDiagnostics": "진단 정보 저장"
},
"updates": {
"available": "OpenScreen {{latestVersion}} 버전을 사용할 수 있습니다. 현재 버전은 {{currentVersion}}입니다.",