Fixed building for simulators or older iOS SDKs
This commit is contained in:
parent
40be7cbc97
commit
7e4560664b
5 changed files with 24 additions and 13 deletions
|
@ -113,12 +113,12 @@ SDL_RenderDriver METAL_RenderDriver = {
|
|||
static int
|
||||
IsMetalAvailable(const SDL_SysWMinfo *syswm)
|
||||
{
|
||||
if (syswm->subsystem != SDL_SYSWM_COCOA) { // !!! FIXME: SDL_SYSWM_UIKIT for iOS, too!
|
||||
return SDL_SetError("Metal render target only supports Cocoa video target at the moment.");
|
||||
if (syswm->subsystem != SDL_SYSWM_COCOA && syswm->subsystem != SDL_SYSWM_UIKIT) {
|
||||
return SDL_SetError("Metal render target only supports Cocoa and UIKit video targets at the moment.");
|
||||
}
|
||||
|
||||
// this checks a weak symbol.
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
|
||||
#if defined(__MACOSX__)
|
||||
if (MTLCreateSystemDefaultDevice == NULL) { // probably on 10.10 or lower.
|
||||
return SDL_SetError("Metal framework not available on this system");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue