瀏覽代碼

Fixed warning in Android build

Sam Lantinga 8 年之前
父節點
當前提交
9171f71dbe
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/video/SDL_egl.c

+ 4 - 1
src/video/SDL_egl.c

@@ -25,6 +25,9 @@
 #if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_WINRT
 #include "../core/windows/SDL_windows.h"
 #endif
+#if SDL_VIDEO_DRIVER_ANDROID
+#include <android/native_window.h>
+#endif
 
 #include "SDL_sysvideo.h"
 #include "SDL_egl_c.h"
@@ -642,7 +645,7 @@ SDL_EGL_CreateSurface(_THIS, NativeWindowType nw)
         return EGL_NO_SURFACE;
     }
     
-#if __ANDROID__
+#if SDL_VIDEO_DRIVER_ANDROID
     {
         /* Android docs recommend doing this!
          * Ref: http://developer.android.com/reference/android/app/NativeActivity.html