Commit bd14aa633f1125362226f94282488889357ad303

Ivan Epifanov 2020-11-21T23:09:30

Autobuild

diff --git a/Makefile.vita.gles2.dolce b/Makefile.vita.gles2.dolce
index d646d43..7573cf4 100644
--- a/Makefile.vita.gles2.dolce
+++ b/Makefile.vita.gles2.dolce
@@ -41,7 +41,7 @@ CC      = $(PREFIX)-gcc
 AR      = $(PREFIX)-ar
 CFLAGS  = -g -Wl,-q -Wall -O3 -Iinclude \
                         -D__VITA__ -D__ARM_ARCH=7 -D__ARM_ARCH_7A__ \
-                        -mfpu=neon -mcpu=cortex-a9 -mfloat-abi=hard
+                        -mfpu=neon -mcpu=cortex-a9 -mfloat-abi=hard -D_VITA_GLES2_
 ASFLAGS = $(CFLAGS)
 
 $(TARGET_LIB): $(OBJS)
diff --git a/Makefile.vita.gxm.dolce b/Makefile.vita.gxm.dolce
index 62699e4..ca84ccd 100644
--- a/Makefile.vita.gxm.dolce
+++ b/Makefile.vita.gxm.dolce
@@ -41,7 +41,7 @@ CC      = $(PREFIX)-gcc
 AR      = $(PREFIX)-ar
 CFLAGS  = -g -Wl,-q -Wall -O3 -Iinclude \
                         -D__VITA__ -D__ARM_ARCH=7 -D__ARM_ARCH_7A__ \
-                        -mfpu=neon -mcpu=cortex-a9 -mfloat-abi=hard
+                        -mfpu=neon -mcpu=cortex-a9 -mfloat-abi=hard -D_VITA_GXM_
 ASFLAGS = $(CFLAGS)
 
 $(TARGET_LIB): $(OBJS)
diff --git a/include/SDL_config_vita.h b/include/SDL_config_vita.h
index 6b12108..dad5098 100644
--- a/include/SDL_config_vita.h
+++ b/include/SDL_config_vita.h
@@ -138,12 +138,14 @@
 #define SDL_VIDEO_DRIVER_VITA  1
 #define SDL_FILESYSTEM_VITA   1
 
-
-//#define SDL_VIDEO_RENDER_VITA_GLES2 1
-#define SDL_VIDEO_RENDER_VITA_GXM 1
+#if defined(_VITA_GLES2_)
+ #define SDL_VIDEO_RENDER_VITA_GLES2 1
+#else
+ #define SDL_VIDEO_RENDER_VITA_GXM 1
+#endif
 
 #if defined(SDL_VIDEO_RENDER_VITA_GLES2) || defined(SDL_VIDEO_RENDER_VITA_GXM)
-#define SDL_VIDEO_OPENGL_ES2 1
+ #define SDL_VIDEO_OPENGL_ES2 1
 #endif
 
 
@@ -154,6 +156,7 @@
 // that' not true, but oh well
 #define SDL_LOADSO_DISABLED    1
 
+/* TODO: VITA does have gyroscope. */
 #define SDL_SENSOR_DISABLED 1
 #define SDL_SENSOR_DUMMY  1
 
diff --git a/src/video/vita/SDL_vitavideo.c b/src/video/vita/SDL_vitavideo.c
index 96cae73..5a22093 100644
--- a/src/video/vita/SDL_vitavideo.c
+++ b/src/video/vita/SDL_vitavideo.c
@@ -280,7 +280,7 @@ VITA_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
 void
 VITA_DestroyWindow(_THIS, SDL_Window * window)
 {
-    SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
+//    SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
     SDL_WindowData *data;
 
     data = window->driverdata;