diff --git a/src/video/vivante/SDL_vivanteplatform.c b/src/video/vivante/SDL_vivanteplatform.c index d1b46a494..694ed2614 100644 --- a/src/video/vivante/SDL_vivanteplatform.c +++ b/src/video/vivante/SDL_vivanteplatform.c @@ -32,6 +32,16 @@ VIVANTE_SetupPlatform(_THIS) return 0; } +char *VIVANTE_GetDisplayName(_THIS) +{ + return NULL; +} + +void +VIVANTE_UpdateDisplayScale(_THIS) +{ +} + void VIVANTE_CleanupPlatform(_THIS) { diff --git a/src/video/vivante/SDL_vivanteplatform.h b/src/video/vivante/SDL_vivanteplatform.h index 23cb4062b..9fa714b8d 100644 --- a/src/video/vivante/SDL_vivanteplatform.h +++ b/src/video/vivante/SDL_vivanteplatform.h @@ -36,6 +36,8 @@ #endif extern int VIVANTE_SetupPlatform(_THIS); +extern char *VIVANTE_GetDisplayName(_THIS); +extern void VIVANTE_UpdateDisplayScale(_THIS); extern void VIVANTE_CleanupPlatform(_THIS); #endif /* SDL_VIDEO_DRIVER_VIVANTE */ diff --git a/src/video/vivante/SDL_vivantevideo.c b/src/video/vivante/SDL_vivantevideo.c index 79b36c258..efa13c509 100644 --- a/src/video/vivante/SDL_vivantevideo.c +++ b/src/video/vivante/SDL_vivantevideo.c @@ -97,6 +97,7 @@ VIVANTE_Create() device->DestroyWindow = VIVANTE_DestroyWindow; device->GetWindowWMInfo = VIVANTE_GetWindowWMInfo; +#if SDL_VIDEO_OPENGL_EGL device->GL_LoadLibrary = VIVANTE_GLES_LoadLibrary; device->GL_GetProcAddress = VIVANTE_GLES_GetProcAddress; device->GL_UnloadLibrary = VIVANTE_GLES_UnloadLibrary; @@ -106,6 +107,7 @@ VIVANTE_Create() device->GL_GetSwapInterval = VIVANTE_GLES_GetSwapInterval; device->GL_SwapWindow = VIVANTE_GLES_SwapWindow; device->GL_DeleteContext = VIVANTE_GLES_DeleteContext; +#endif device->PumpEvents = VIVANTE_PumpEvents; @@ -152,6 +154,9 @@ VIVANTE_AddVideoDisplays(_THIS) switch (bpp) { default: /* Is another format used? */ + case 32: + current_mode.format = SDL_PIXELFORMAT_ARGB8888; + break; case 16: current_mode.format = SDL_PIXELFORMAT_RGB565; break; @@ -160,6 +165,7 @@ VIVANTE_AddVideoDisplays(_THIS) current_mode.refresh_rate = 60; SDL_zero(display); + display.name = VIVANTE_GetDisplayName(_this); display.desktop_mode = current_mode; display.current_mode = current_mode; display.driverdata = data; @@ -208,6 +214,8 @@ VIVANTE_VideoInit(_THIS) return -1; } + VIVANTE_UpdateDisplayScale(_this); + #ifdef SDL_INPUT_LINUXEV if (SDL_EVDEV_Init() < 0) { return -1; @@ -281,6 +289,7 @@ VIVANTE_CreateWindow(_THIS, SDL_Window * window) return SDL_SetError("VIVANTE: Can't create native window"); } +#if SDL_VIDEO_OPENGL_EGL if (window->flags & SDL_WINDOW_OPENGL) { data->egl_surface = SDL_EGL_CreateSurface(_this, data->native_window); if (data->egl_surface == EGL_NO_SURFACE) { @@ -289,6 +298,7 @@ VIVANTE_CreateWindow(_THIS, SDL_Window * window) } else { data->egl_surface = EGL_NO_SURFACE; } +#endif /* Window has been successfully created */ return 0; @@ -302,9 +312,11 @@ VIVANTE_DestroyWindow(_THIS, SDL_Window * window) data = window->driverdata; if (data) { +#if SDL_VIDEO_OPENGL_EGL if (data->egl_surface != EGL_NO_SURFACE) { SDL_EGL_DestroySurface(_this, data->egl_surface); } +#endif if (data->native_window) { #if SDL_VIDEO_DRIVER_VIVANTE_VDK