mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-07-03 04:21:34 +08:00
[fix] fix startup failure caused by wgc_plugin working directory change
This commit is contained in:
@@ -1,9 +1,26 @@
|
||||
#include <mutex>
|
||||
|
||||
#include "path_manager.h"
|
||||
#include "rd_log.h"
|
||||
#include "screen_capturer_wgc.h"
|
||||
#include "wgc_plugin_api.h"
|
||||
|
||||
namespace {
|
||||
|
||||
void InitializePluginLogger() {
|
||||
static std::once_flag once;
|
||||
std::call_once(once, []() {
|
||||
crossdesk::PathManager path_manager("CrossDesk");
|
||||
crossdesk::InitLogger(path_manager.GetLogPath().string());
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
extern "C" {
|
||||
|
||||
crossdesk::ScreenCapturer* CrossDeskCreateWgcCapturer() {
|
||||
InitializePluginLogger();
|
||||
return new crossdesk::ScreenCapturerWgc();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user