mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
Allow building on XCode 8
This commit is contained in:
@@ -31,6 +31,7 @@ bool VTRenderer::initialize(SDL_Window* window,
|
|||||||
if (videoFormat & VIDEO_FORMAT_MASK_H264) {
|
if (videoFormat & VIDEO_FORMAT_MASK_H264) {
|
||||||
// Prior to 10.13, we'll just assume everything has
|
// Prior to 10.13, we'll just assume everything has
|
||||||
// H.264 support and fail open to allow VT decode.
|
// H.264 support and fail open to allow VT decode.
|
||||||
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
|
||||||
if (__builtin_available(macOS 10.13, *)) {
|
if (__builtin_available(macOS 10.13, *)) {
|
||||||
if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_H264)) {
|
if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_H264)) {
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
@@ -38,12 +39,15 @@ bool VTRenderer::initialize(SDL_Window* window,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"Assuming H.264 HW decode on < macOS 10.13");
|
"Assuming H.264 HW decode on < macOS 10.13");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (videoFormat & VIDEO_FORMAT_MASK_H265) {
|
else if (videoFormat & VIDEO_FORMAT_MASK_H265) {
|
||||||
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
|
||||||
if (__builtin_available(macOS 10.13, *)) {
|
if (__builtin_available(macOS 10.13, *)) {
|
||||||
if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC)) {
|
if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC)) {
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
@@ -51,7 +55,9 @@ bool VTRenderer::initialize(SDL_Window* window,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
// Fail closed for HEVC if we're not on 10.13+
|
// Fail closed for HEVC if we're not on 10.13+
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"No HEVC support on < macOS 10.13");
|
"No HEVC support on < macOS 10.13");
|
||||||
|
|||||||
Reference in New Issue
Block a user