Skip to content

Commit

Permalink
fixup! [RetroPlayer] allow using wayland with CRPRendererDMA
Browse files Browse the repository at this point in the history
  • Loading branch information
lrusak committed Apr 6, 2020
1 parent 4600bb0 commit 31df19c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion xbmc/cores/RetroPlayer/buffers/CMakeLists.txt
Expand Up @@ -24,7 +24,7 @@ if(OPENGL_FOUND)
RenderBufferPoolOpenGL.cpp)
endif()

if((CORE_PLATFORM_NAME_LC STREQUAL gbm OR CORE_PLATFORM_NAME_LC STREQUAL wayland))
if(CORE_PLATFORM_NAME_LC STREQUAL gbm OR CORE_PLATFORM_NAME_LC STREQUAL wayland)
list(APPEND SOURCES RenderBufferDMA.cpp
RenderBufferPoolDMA.cpp)
list(APPEND HEADERS RenderBufferDMA.h
Expand Down
10 changes: 7 additions & 3 deletions xbmc/cores/RetroPlayer/buffers/RenderBufferDMA.cpp
Expand Up @@ -20,11 +20,15 @@ using namespace RETRO;
CRenderBufferDMA::CRenderBufferDMA(CRenderContext& context, int fourcc)
: m_context(context),
m_fourcc(fourcc),
m_egl(new CEGLImage(
dynamic_cast<KODI::WINDOWING::LINUX::CWinSystemEGL*>(CServiceBroker::GetWinSystem())
->GetEGLDisplay())),
m_bo(CBufferObject::GetBufferObject())
{
auto winSystemEGL =
dynamic_cast<KODI::WINDOWING::LINUX::CWinSystemEGL*>(CServiceBroker::GetWinSystem());

if (!winSystemEGL)
throw std::runtime_error("dynamic_cast failed to cast to CWinSystemEGL");

m_egl = std::make_unique<CEGLImage>(winSystemEGL->GetEGLDisplay());
}

CRenderBufferDMA::~CRenderBufferDMA()
Expand Down
Expand Up @@ -18,7 +18,7 @@ if(OPENGL_FOUND)
list(APPEND HEADERS RPRendererOpenGL.h)
endif()

if((CORE_PLATFORM_NAME_LC STREQUAL gbm OR CORE_PLATFORM_NAME_LC STREQUAL wayland))
if(CORE_PLATFORM_NAME_LC STREQUAL gbm OR CORE_PLATFORM_NAME_LC STREQUAL wayland)
list(APPEND SOURCES RPRendererDMA.cpp)
list(APPEND HEADERS RPRendererDMA.h)
endif()
Expand Down

0 comments on commit 31df19c

Please sign in to comment.