Fixed crash trying to create a metal view with the dummy driver
This commit is contained in:
@@ -5138,6 +5138,11 @@ SDL_MetalView SDL_Metal_CreateView(SDL_Window *window)
|
|||||||
{
|
{
|
||||||
CHECK_WINDOW_MAGIC(window, NULL);
|
CHECK_WINDOW_MAGIC(window, NULL);
|
||||||
|
|
||||||
|
if (!_this->Metal_CreateView) {
|
||||||
|
SDL_Unsupported();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(window->flags & SDL_WINDOW_METAL)) {
|
if (!(window->flags & SDL_WINDOW_METAL)) {
|
||||||
/* No problem, we can convert to Metal */
|
/* No problem, we can convert to Metal */
|
||||||
if (window->flags & SDL_WINDOW_OPENGL) {
|
if (window->flags & SDL_WINDOW_OPENGL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user