mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
refactor: 优化初始化 winrt
This commit is contained in:
parent
a75d54419a
commit
90459fe347
6 changed files with 26 additions and 11 deletions
|
|
@ -52,9 +52,6 @@ bool GraphicsCaptureFrameSource::Initialize() {
|
|||
SIZE frameSize = { LONG(_frameInWnd.right - _frameInWnd.left), LONG(_frameInWnd.bottom - _frameInWnd.top) };
|
||||
|
||||
try {
|
||||
// Windows.Graphics.Capture API 似乎只能运行于 MTA,造成诸多麻烦
|
||||
winrt::init_apartment(winrt::apartment_type::multi_threaded);
|
||||
|
||||
if (!winrt::ApiInformation::IsTypePresent(L"Windows.Graphics.Capture.GraphicsCaptureSession")) {
|
||||
SPDLOG_LOGGER_ERROR(logger, "不存在 GraphicsCaptureSession API");
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue