SDL3 with Hardware Acceleration for ROCKCHIP platform (mali blob)

This commit is contained in:
avafinger
2022-12-25 21:44:40 -03:00
committed by Sam Lantinga
parent 074a2b0f30
commit 12e0e6d130
5 changed files with 26 additions and 4 deletions

View File

@@ -37,8 +37,9 @@
void KMSDRM_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor)
{
/* if SDL was _also_ built with the Raspberry Pi driver (so we're
definitely a Pi device), default to GLES2. */
#if SDL_VIDEO_DRIVER_RPI
definitely a Pi device) or with the ROCKCHIP video driver
(it's a ROCKCHIP device), default to GLES2. */
#if defined(SDL_VIDEO_DRIVER_RPI) || defined(SDL_VIDEO_DRIVER_ROCKCHIP)
*mask = SDL_GL_CONTEXT_PROFILE_ES;
*major = 2;
*minor = 0;

View File

@@ -302,7 +302,9 @@ static SDL_VideoDevice *KMSDRM_CreateDevice(void)
return device;
cleanup:
SDL_free(device);
if (device) {
SDL_free(device);
}
if (viddata) {
SDL_free(viddata);