mirror of https://github.com/mpv-player/mpv
configure: build with wayland 1.2.0
For the time being there will be a check if someone uses wayland from git, because I really really like to have the others formats too.
This commit is contained in:
parent
13f3b55881
commit
353686e636
|
@ -1702,7 +1702,7 @@ depends_on_application_services(){
|
|||
|
||||
fi #if darwin
|
||||
|
||||
_wlver="1.2.90"
|
||||
_wlver="1.2.0"
|
||||
echocheck "Wayland"
|
||||
if test "$_wayland" = yes || test "$_wayland" = auto; then
|
||||
_wayland="no"
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "video/sws_utils.h"
|
||||
|
||||
#include "wayland_common.h"
|
||||
#include "wayland-version.h"
|
||||
|
||||
#define MAX_BUFFERS 2
|
||||
|
||||
|
@ -57,6 +58,9 @@ struct fmtentry {
|
|||
static const struct fmtentry fmttable[] = {
|
||||
{WL_SHM_FORMAT_ARGB8888, IMGFMT_BGRA}, // 8b 8g 8r 8a
|
||||
{WL_SHM_FORMAT_XRGB8888, IMGFMT_BGR0},
|
||||
#if (WAYLAND_VERSION_MAJOR >= 1) \
|
||||
&& (WAYLAND_VERSION_MINOR >= 2) \
|
||||
&& (WAYLAND_VERSION_MICRO >= 90)
|
||||
{WL_SHM_FORMAT_RGB332, IMGFMT_BGR8}, // 3b 3g 2r
|
||||
{WL_SHM_FORMAT_BGR233, IMGFMT_RGB8}, // 3r 3g 3b,
|
||||
{WL_SHM_FORMAT_XRGB4444, IMGFMT_BGR12_LE}, // 4b 4g 4r 4a
|
||||
|
@ -85,6 +89,7 @@ static const struct fmtentry fmttable[] = {
|
|||
{WL_SHM_FORMAT_ABGR8888, IMGFMT_RGBA},
|
||||
{WL_SHM_FORMAT_RGBA8888, IMGFMT_ABGR},
|
||||
{WL_SHM_FORMAT_BGRA8888, IMGFMT_ARGB},
|
||||
#endif
|
||||
};
|
||||
|
||||
#define MAX_FORMAT_ENTRIES (sizeof(fmttable) / sizeof(fmttable[0]))
|
||||
|
|
Loading…
Reference in New Issue