src/video/android/SDL_androidvideo.c
changeset 7191 75360622e65f
parent 7135 20db445af8c7
child 7253 eee81780005e
equal deleted inserted replaced
7190:11612d544fcd 7191:75360622e65f
    46 
    46 
    47 /* GL functions (SDL_androidgl.c) */
    47 /* GL functions (SDL_androidgl.c) */
    48 extern int Android_GL_LoadLibrary(_THIS, const char *path);
    48 extern int Android_GL_LoadLibrary(_THIS, const char *path);
    49 extern void *Android_GL_GetProcAddress(_THIS, const char *proc);
    49 extern void *Android_GL_GetProcAddress(_THIS, const char *proc);
    50 extern void Android_GL_UnloadLibrary(_THIS);
    50 extern void Android_GL_UnloadLibrary(_THIS);
    51 //extern int *Android_GL_GetVisual(_THIS, Display * display, int screen);
       
    52 extern SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window);
    51 extern SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window);
    53 extern int Android_GL_MakeCurrent(_THIS, SDL_Window * window,
    52 extern int Android_GL_MakeCurrent(_THIS, SDL_Window * window,
    54                               SDL_GLContext context);
    53                               SDL_GLContext context);
    55 extern int Android_GL_SetSwapInterval(_THIS, int interval);
    54 extern int Android_GL_SetSwapInterval(_THIS, int interval);
    56 extern int Android_GL_GetSwapInterval(_THIS);
    55 extern int Android_GL_GetSwapInterval(_THIS);
    58 extern void Android_GL_DeleteContext(_THIS, SDL_GLContext context);
    57 extern void Android_GL_DeleteContext(_THIS, SDL_GLContext context);
    59 
    58 
    60 /* Android driver bootstrap functions */
    59 /* Android driver bootstrap functions */
    61 
    60 
    62 
    61 
    63 // These are filled in with real values in Android_SetScreenResolution on 
    62 /* These are filled in with real values in Android_SetScreenResolution on init (before SDL_main()) */
    64 // init (before SDL_main())
       
    65 int Android_ScreenWidth = 0;
    63 int Android_ScreenWidth = 0;
    66 int Android_ScreenHeight = 0;
    64 int Android_ScreenHeight = 0;
    67 Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_UNKNOWN;
    65 Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_UNKNOWN;
    68 SDL_sem *Android_PauseSem = NULL, *Android_ResumeSem = NULL;
    66 SDL_sem *Android_PauseSem = NULL, *Android_ResumeSem = NULL;
    69 
    67 
   180 /* This function gets called before VideoInit() */
   178 /* This function gets called before VideoInit() */
   181 void
   179 void
   182 Android_SetScreenResolution(int width, int height, Uint32 format)
   180 Android_SetScreenResolution(int width, int height, Uint32 format)
   183 {
   181 {
   184     Android_ScreenWidth = width;
   182     Android_ScreenWidth = width;
   185     Android_ScreenHeight = height;   
   183     Android_ScreenHeight = height;
   186     Android_ScreenFormat = format;
   184     Android_ScreenFormat = format;
   187 
   185 
   188     if (Android_Window) {
   186     if (Android_Window) {
   189         SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESIZED, width, height);
   187         SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESIZED, width, height);
   190     }
   188     }