mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-21 21:45:01 -04:00
libobs: Introduce the concept of a Unix platform
This is a Unix-specific code. The only available platforms at this point are the X11/GLX and X11/EGL platforms. The concept of a platform display is also introduced. Again, the only display that is set right now is the X11 display.
This commit is contained in:
1 parent
510c747459
commit
506b950d02
6 files changed
+125
-5
No files matched your search
@@ -58,6 +58,11 @@
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
#include <obs-nix-platform.h>
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "ui-config.h"
|
||||
@@ -1384,6 +1389,13 @@ bool OBSApp::OBSInit()
|
||||
|
||||
qRegisterMetaType<VoidFunc>();
|
||||
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
obs_set_nix_platform(OBS_NIX_PLATFORM_X11_GLX);
|
||||
if (QApplication::platformName() == "xcb") {
|
||||
obs_set_nix_platform_display(QX11Info::display());
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!StartupOBS(locale.c_str(), GetProfilerNameStore()))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user