mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Choose between x11grab and kmsgrab at runtime
This commit is contained in:
@@ -98,7 +98,7 @@ exportSurfaceHandle_fn exportSurfaceHandle;
|
||||
|
||||
using display_t = util::dyn_safe_ptr_v2<void, VAStatus, &terminate>;
|
||||
|
||||
int init() {
|
||||
int init_main_va() {
|
||||
static void *handle { nullptr };
|
||||
static bool funcs_loaded = false;
|
||||
|
||||
@@ -129,8 +129,8 @@ int init() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int init_drm() {
|
||||
if(init()) {
|
||||
int init() {
|
||||
if(init_main_va()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -346,17 +346,4 @@ std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height) {
|
||||
|
||||
return egl;
|
||||
}
|
||||
} // namespace va
|
||||
|
||||
namespace platf {
|
||||
std::unique_ptr<deinit_t> init() {
|
||||
gbm::init();
|
||||
va::init_drm();
|
||||
|
||||
if(!gladLoaderLoadEGL(EGL_NO_DISPLAY) || !eglGetPlatformDisplay) {
|
||||
BOOST_LOG(warning) << "Couldn't load EGL library"sv;
|
||||
}
|
||||
|
||||
return std::make_unique<deinit_t>();
|
||||
}
|
||||
} // namespace platf
|
||||
} // namespace va
|
||||
Reference in New Issue
Block a user