Build without PIB support by default and add flag to enable it

This commit is contained in:
Ivan Epifanov
2021-06-10 13:20:39 +03:00
committed by Ryan C. Gordon
parent a4442476df
commit bbdd08e0b2
4 changed files with 24 additions and 13 deletions

View File

@@ -20,8 +20,7 @@
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_VITA && SDL_VIDEO_OPENGL_ES2
#if SDL_VIDEO_DRIVER_VITA && SDL_VIDEO_VITA_PIB
#include <stdlib.h>
#include <string.h>

View File

@@ -38,7 +38,7 @@
#include "SDL_vitakeyboard.h"
#include "SDL_vitamouse_c.h"
#include "SDL_vitaframebuffer.h"
#if SDL_VIDEO_OPENGL_ES2
#if SDL_VIDEO_VITA_PIB
#include "SDL_vitagl_c.h"
#endif
#include <psp2/ime_dialog.h>
@@ -62,7 +62,7 @@ VITA_Create()
{
SDL_VideoDevice *device;
SDL_VideoData *phdata;
#if SDL_VIDEO_OPENGL_ES2
#if SDL_VIDEO_VITA_PIB
SDL_GLDriverData *gldata;
#endif
/* Initialize SDL_VideoDevice structure */
@@ -79,7 +79,7 @@ VITA_Create()
SDL_free(device);
return NULL;
}
#if SDL_VIDEO_OPENGL_ES2
#if SDL_VIDEO_VITA_PIB
gldata = (SDL_GLDriverData *) SDL_calloc(1, sizeof(SDL_GLDriverData));
if (gldata == NULL) {
@@ -130,7 +130,7 @@ VITA_Create()
device->DestroyWindowFramebuffer = VITA_DestroyWindowFramebuffer;
*/
#if SDL_VIDEO_OPENGL_ES2
#if SDL_VIDEO_VITA_PIB
device->GL_LoadLibrary = VITA_GL_LoadLibrary;
device->GL_GetProcAddress = VITA_GL_GetProcAddress;
device->GL_UnloadLibrary = VITA_GL_UnloadLibrary;