- More implementations and dependencies for Linux Wayland support
This commit is contained in:
@@ -22,24 +22,20 @@
|
||||
|
||||
#ifdef FENNEC_LIB_WAYLAND
|
||||
#include <fennec/platform/linux/wayland/lib/dyn.h>
|
||||
#include <fennec/platform/linux/wayland/display.h>
|
||||
#include <fennec/platform/linux/wayland/displaydev.h>
|
||||
#endif
|
||||
|
||||
namespace fennec
|
||||
{
|
||||
|
||||
linux_platform::linux_platform(user _type)
|
||||
: platform(_type)
|
||||
linux_platform::linux_platform()
|
||||
: platform()
|
||||
, _display_driver(display_none) {
|
||||
switch (_type) {
|
||||
case user::client: {
|
||||
_runtime_client_checks();
|
||||
return;
|
||||
}
|
||||
case user::server: {
|
||||
_runtime_server_checks();
|
||||
}
|
||||
}
|
||||
#if FENNEC_BUILD_SERVER
|
||||
_runtime_server_checks();
|
||||
#else
|
||||
_runtime_client_checks();
|
||||
#endif
|
||||
}
|
||||
|
||||
linux_platform::~linux_platform() {
|
||||
@@ -72,7 +68,17 @@ platform::function_pointer linux_platform::find_symbol(shared_object* hndl, cons
|
||||
return (function_pointer)symbol;
|
||||
}
|
||||
|
||||
display* linux_platform::get_display() {
|
||||
platform::global linux_platform::find_global(shared_object* hndl, const cstring& name) {
|
||||
string _name = name;
|
||||
void* symbol = dlsym(hndl, _name);
|
||||
if (symbol == nullptr) {
|
||||
_name = '_' + _name;
|
||||
symbol = dlsym(hndl, _name);
|
||||
}
|
||||
return symbol;
|
||||
}
|
||||
|
||||
displaydev* linux_platform::get_display() {
|
||||
return _display;
|
||||
}
|
||||
|
||||
@@ -82,7 +88,7 @@ void linux_platform::_runtime_client_checks() {
|
||||
_display_driver = display_wayland;
|
||||
_display = new wayland_display(this);
|
||||
libwayland::unload_symbols(this); // Doesn't actually unload symbols, just resets ref counter to only consider
|
||||
// the created display
|
||||
// the created display
|
||||
}
|
||||
#endif
|
||||
assertf(_display != nullptr, "failed to find suitable display driver");
|
||||
|
||||
Reference in New Issue
Block a user