mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-10 17:55:47 -04:00
GL/Context: Support fbdev
This commit is contained in:
@ -182,6 +182,13 @@ if(USE_EGL)
|
||||
)
|
||||
target_link_libraries(common PUBLIC GBM::GBM)
|
||||
endif()
|
||||
if(USE_FBDEV)
|
||||
target_compile_definitions(common PRIVATE "-DUSE_FBDEV=1")
|
||||
target_sources(common PRIVATE
|
||||
gl/context_egl_fbdev.cpp
|
||||
gl/context_egl_fbdev.h
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(USE_X11)
|
||||
|
@ -16,13 +16,16 @@ Log_SetChannel(GL::Context);
|
||||
#endif
|
||||
|
||||
#ifdef USE_EGL
|
||||
#if defined(USE_WAYLAND) || defined(USE_GBM) || defined(USE_X11)
|
||||
#if defined(USE_WAYLAND) || defined(USE_GBM) || defined(USE_FBDEV) || defined(USE_X11)
|
||||
#if defined(USE_WAYLAND)
|
||||
#include "context_egl_wayland.h"
|
||||
#endif
|
||||
#if defined(USE_GBM)
|
||||
#include "context_egl_gbm.h"
|
||||
#endif
|
||||
#if defined(USE_FBDEV)
|
||||
#include "context_egl_fbdev.h"
|
||||
#endif
|
||||
#if defined(USE_X11)
|
||||
#include "context_egl_x11.h"
|
||||
#endif
|
||||
@ -129,6 +132,11 @@ std::unique_ptr<GL::Context> Context::Create(const WindowInfo& wi, const Version
|
||||
context = ContextEGLGBM::Create(wi, versions_to_try, num_versions_to_try);
|
||||
#endif
|
||||
|
||||
#if defined(USE_FBDEV)
|
||||
if (wi.type == WindowInfo::Type::Display)
|
||||
context = ContextEGLFBDev::Create(wi, versions_to_try, num_versions_to_try);
|
||||
#endif
|
||||
|
||||
if (!context)
|
||||
return nullptr;
|
||||
|
||||
|
@ -18,7 +18,7 @@ if(USE_SDL2)
|
||||
target_link_libraries(duckstation-nogui PRIVATE ${SDL2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(USE_DRMKMS)
|
||||
if(USE_DRMKMS OR USE_FBDEV)
|
||||
find_package(LIBEVDEV REQUIRED)
|
||||
|
||||
target_sources(duckstation-nogui PRIVATE
|
||||
|
Reference in New Issue
Block a user