Browse Source

metal: fix some define checks.

Alex Szpakowski 3 years ago
parent
commit
a76606e76e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/modules/graphics/Graphics.cpp

+ 2 - 2
src/modules/graphics/Graphics.cpp

@@ -106,7 +106,7 @@ bool isDebugEnabled()
 love::Type Graphics::type("graphics", &Module::type);
 love::Type Graphics::type("graphics", &Module::type);
 
 
 namespace opengl { extern love::graphics::Graphics *createInstance(); }
 namespace opengl { extern love::graphics::Graphics *createInstance(); }
-#if defined(LOVE_MACOS) || defined(LOVE_IOS)
+#ifdef LOVE_GRAPHICS_METAL
 namespace metal { extern love::graphics::Graphics *createInstance(); }
 namespace metal { extern love::graphics::Graphics *createInstance(); }
 #endif
 #endif
 
 
@@ -153,7 +153,7 @@ Graphics *Graphics::createInstance()
 
 
 			if (r == RENDERER_OPENGL)
 			if (r == RENDERER_OPENGL)
 				instance = opengl::createInstance();
 				instance = opengl::createInstance();
-#if defined(LOVE_MACOS) || defined(LOVE_IOS)
+#ifdef LOVE_GRAPHICS_METAL
 			if (r == RENDERER_METAL)
 			if (r == RENDERER_METAL)
 				instance = metal::createInstance();
 				instance = metal::createInstance();
 #endif
 #endif