mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
fix: 统一使用程序所在目录而不是工作目录
否则使用 CreateProcess 启动时会出错
This commit is contained in:
parent
5e7a2d9ef9
commit
cb702dea60
7 changed files with 12 additions and 16 deletions
|
|
@ -59,7 +59,7 @@ bool GraphicsCaptureFrameSource::Initialize() {
|
|||
}
|
||||
|
||||
if (!_CaptureFromWindow(interop)) {
|
||||
SPDLOG_LOGGER_INFO(logger, "源窗口无法使用窗口捕获,回落到屏幕捕获");
|
||||
SPDLOG_LOGGER_INFO(logger, "源窗口无法使用窗口捕获,回落到屏幕捕获");
|
||||
if (!_CaptureFromMonitor(interop)) {
|
||||
SPDLOG_LOGGER_ERROR(logger, "屏幕捕获失败");
|
||||
return false;
|
||||
|
|
@ -234,6 +234,7 @@ bool GraphicsCaptureFrameSource::_CaptureFromMonitor(winrt::impl::com_ref<IGraph
|
|||
return false;
|
||||
}
|
||||
|
||||
// 放在屏幕左上角而不是中间可以提高帧率,这里是为了和 DesktopDuplication 保持一致
|
||||
if (!_CenterWindowIfNecessary(hwndSrc, mi.rcWork)) {
|
||||
SPDLOG_LOGGER_ERROR(logger, "居中源窗口失败");
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue