mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 07:46:07 +00:00
Fix build with old EGL 1.5 headers without EGL_EGL_PROTOTYPES
This commit is contained in:
parent
5bf4266973
commit
c3cea0238e
@ -15,18 +15,6 @@
|
|||||||
#include <SDL_render.h>
|
#include <SDL_render.h>
|
||||||
#include <SDL_syswm.h>
|
#include <SDL_syswm.h>
|
||||||
|
|
||||||
#ifndef EGL_VERSION_1_5
|
|
||||||
typedef intptr_t EGLAttrib;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(EGL_VERSION_1_5) || !defined(EGL_EGL_PROTOTYPES)
|
|
||||||
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYPROC) (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef EGL_EXT_platform_base
|
|
||||||
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// These are EGL extensions, so some platform headers may not provide them
|
// These are EGL extensions, so some platform headers may not provide them
|
||||||
#ifndef EGL_PLATFORM_WAYLAND_KHR
|
#ifndef EGL_PLATFORM_WAYLAND_KHR
|
||||||
#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
|
#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
|
||||||
|
@ -9,7 +9,6 @@ extern "C" {
|
|||||||
#include <libavcodec/avcodec.h>
|
#include <libavcodec/avcodec.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_EGL
|
|
||||||
#ifdef HAVE_EGL
|
#ifdef HAVE_EGL
|
||||||
#define MESA_EGL_NO_X11_HEADERS
|
#define MESA_EGL_NO_X11_HEADERS
|
||||||
#define EGL_NO_X11
|
#define EGL_NO_X11
|
||||||
@ -18,17 +17,25 @@ extern "C" {
|
|||||||
#ifndef EGL_VERSION_1_5
|
#ifndef EGL_VERSION_1_5
|
||||||
typedef intptr_t EGLAttrib;
|
typedef intptr_t EGLAttrib;
|
||||||
typedef void *EGLImage;
|
typedef void *EGLImage;
|
||||||
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
|
|
||||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EGL_KHR_image
|
#if !defined(EGL_VERSION_1_5) || !defined(EGL_EGL_PROTOTYPES)
|
||||||
|
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image);
|
||||||
|
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYPROC) (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(EGL_KHR_image) || !defined(EGL_EGLEXT_PROTOTYPES)
|
||||||
// EGL_KHR_image technically uses EGLImageKHR instead of EGLImage, but they're compatible
|
// EGL_KHR_image technically uses EGLImageKHR instead of EGLImage, but they're compatible
|
||||||
// so we swap them here to avoid mixing them all over the place
|
// so we swap them here to avoid mixing them all over the place
|
||||||
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImage image);
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImage image);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(EGL_EXT_platform_base) || !defined(EGL_EGLEXT_PROTOTYPES)
|
||||||
|
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef EGL_EXT_image_dma_buf_import
|
#ifndef EGL_EXT_image_dma_buf_import
|
||||||
#define EGL_LINUX_DMA_BUF_EXT 0x3270
|
#define EGL_LINUX_DMA_BUF_EXT 0x3270
|
||||||
#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
|
#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
|
||||||
@ -43,7 +50,6 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EGL_MAX_PLANES 4
|
#define EGL_MAX_PLANES 4
|
||||||
#endif
|
|
||||||
|
|
||||||
class EGLExtensions {
|
class EGLExtensions {
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user