[feat] load wgc from wgc_plugin.dll at runtime and drop direct'windowsapp' linking, refs #74

This commit is contained in:
dijunkun
2026-03-20 01:36:36 +08:00
parent 2f26334775
commit 1d3cac54ab
9 changed files with 172 additions and 17 deletions

View File

@@ -4,15 +4,14 @@
#include <atomic>
#include <functional>
#include <iostream>
#include <memory>
#include "rd_log.h"
#define CHECK_INIT \
if (!is_initialized_) { \
std::cout << "AE_NEED_INIT" << std::endl; \
return 4; \
#define CHECK_INIT \
if (!is_initialized_) { \
LOG_ERROR("AE_NEED_INIT"); \
return 4; \
}
#define CHECK_CLOSED \
@@ -324,7 +323,7 @@ int WgcSessionImpl::Initialize() {
if (is_initialized_) return 0;
if (!(d3d11_direct_device_ = CreateD3D11Device())) {
std::cout << "AE_D3D_CREATE_DEVICE_FAILED" << std::endl;
LOG_ERROR("AE_D3D_CREATE_DEVICE_FAILED");
return 1;
}