Added a way to get the native Android window and EGL context

This commit is contained in:
Sam Lantinga
2014-06-02 09:01:26 -07:00
parent 3905b910f3
commit 32665131f6
4 changed files with 36 additions and 2 deletions

View File

@@ -98,6 +98,11 @@ typedef struct _UIViewController UIViewController;
#endif
#endif
#if defined(SDL_VIDEO_DRIVER_ANDROID)
typedef struct ANativeWindow ANativeWindow;
typedef void *EGLSurface;
#endif
/**
* These are the various supported windowing subsystems
*/
@@ -111,7 +116,8 @@ typedef enum
SDL_SYSWM_UIKIT,
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
SDL_SYSWM_WINRT
SDL_SYSWM_WINRT,
SDL_SYSWM_ANDROID
} SDL_SYSWM_TYPE;
/**
@@ -225,6 +231,14 @@ struct SDL_SysWMinfo
} mir;
#endif
#if defined(SDL_VIDEO_DRIVER_ANDROID)
struct
{
ANativeWindow *window;
EGLSurface surface;
} android;
#endif
/* Can't have an empty union */
int dummy;
} info;