|
@@ -125,7 +125,7 @@ static SDL_VideoDevice *VITA_Create(void)
|
|
|
|
|
|
#if defined(SDL_VIDEO_VITA_PIB) || defined(SDL_VIDEO_VITA_PVR)
|
|
#if defined(SDL_VIDEO_VITA_PIB) || defined(SDL_VIDEO_VITA_PVR)
|
|
#ifdef SDL_VIDEO_VITA_PVR_OGL
|
|
#ifdef SDL_VIDEO_VITA_PVR_OGL
|
|
- if (SDL_getenv("VITA_PVR_OGL") != NULL) {
|
|
|
|
|
|
+ if (SDL_GetHintBoolean(SDL_HINT_VITA_PVR_OPENGL, SDL_FALSE)) {
|
|
device->GL_LoadLibrary = VITA_GL_LoadLibrary;
|
|
device->GL_LoadLibrary = VITA_GL_LoadLibrary;
|
|
device->GL_CreateContext = VITA_GL_CreateContext;
|
|
device->GL_CreateContext = VITA_GL_CreateContext;
|
|
device->GL_GetProcAddress = VITA_GL_GetProcAddress;
|
|
device->GL_GetProcAddress = VITA_GL_GetProcAddress;
|
|
@@ -170,19 +170,19 @@ int VITA_VideoInit(SDL_VideoDevice *_this)
|
|
{
|
|
{
|
|
SDL_DisplayMode mode;
|
|
SDL_DisplayMode mode;
|
|
#ifdef SDL_VIDEO_VITA_PVR
|
|
#ifdef SDL_VIDEO_VITA_PVR
|
|
- const char *res = SDL_getenv("VITA_RESOLUTION");
|
|
|
|
|
|
+ const char *res = SDL_GetHint(SDL_HINT_VITA_RESOLUTION);
|
|
#endif
|
|
#endif
|
|
SDL_zero(mode);
|
|
SDL_zero(mode);
|
|
|
|
|
|
#ifdef SDL_VIDEO_VITA_PVR
|
|
#ifdef SDL_VIDEO_VITA_PVR
|
|
if (res) {
|
|
if (res) {
|
|
/* 1088i for PSTV (Or Sharpscale) */
|
|
/* 1088i for PSTV (Or Sharpscale) */
|
|
- if (!SDL_strncmp(res, "1080", 4)) {
|
|
|
|
|
|
+ if (SDL_strncmp(res, "1080", 4) == 0) {
|
|
mode.w = 1920;
|
|
mode.w = 1920;
|
|
mode.h = 1088;
|
|
mode.h = 1088;
|
|
}
|
|
}
|
|
/* 725p for PSTV (Or Sharpscale) */
|
|
/* 725p for PSTV (Or Sharpscale) */
|
|
- else if (!SDL_strncmp(res, "720", 3)) {
|
|
|
|
|
|
+ else if (SDL_strncmp(res, "720", 3) == 0) {
|
|
mode.w = 1280;
|
|
mode.w = 1280;
|
|
mode.h = 725;
|
|
mode.h = 725;
|
|
}
|
|
}
|
|
@@ -261,7 +261,8 @@ int VITA_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_Properties
|
|
win.windowSize = PSP2_WINDOW_960X544;
|
|
win.windowSize = PSP2_WINDOW_960X544;
|
|
}
|
|
}
|
|
if (window->flags & SDL_WINDOW_OPENGL) {
|
|
if (window->flags & SDL_WINDOW_OPENGL) {
|
|
- if (SDL_getenv("VITA_PVR_OGL") != NULL) {
|
|
|
|
|
|
+ SDL_bool use_opengl = SDL_GetHintBoolean(SDL_HINT_VITA_PVR_OPENGL, SDL_FALSE);
|
|
|
|
+ if (use_opengl) {
|
|
/* Set version to 2.1 and PROFILE to ES */
|
|
/* Set version to 2.1 and PROFILE to ES */
|
|
temp_major = _this->gl_config.major_version;
|
|
temp_major = _this->gl_config.major_version;
|
|
temp_minor = _this->gl_config.minor_version;
|
|
temp_minor = _this->gl_config.minor_version;
|
|
@@ -275,7 +276,7 @@ int VITA_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_Properties
|
|
if (wdata->egl_surface == EGL_NO_SURFACE) {
|
|
if (wdata->egl_surface == EGL_NO_SURFACE) {
|
|
return SDL_SetError("Could not create GLES window surface");
|
|
return SDL_SetError("Could not create GLES window surface");
|
|
}
|
|
}
|
|
- if (SDL_getenv("VITA_PVR_OGL") != NULL) {
|
|
|
|
|
|
+ if (use_opengl) {
|
|
/* Revert */
|
|
/* Revert */
|
|
_this->gl_config.major_version = temp_major;
|
|
_this->gl_config.major_version = temp_major;
|
|
_this->gl_config.minor_version = temp_minor;
|
|
_this->gl_config.minor_version = temp_minor;
|