Deprecate dolcesdk

main
Ivan Epifanov 2021-03-08 18:39:00 +03:00 committed by Sam Lantinga
parent e1d9cbf65c
commit e58a955e68
5 changed files with 53 additions and 85 deletions

View File

@ -2077,38 +2077,19 @@ elseif(VITA)
set(SOURCE_FILES ${SOURCE_FILES} ${VITA_VIDEO_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${VITA_VIDEO_SOURCES})
set(HAVE_SDL_VIDEO TRUE) set(HAVE_SDL_VIDEO TRUE)
if(DOLCESDK) check_include_file(pib.h HAVE_PIGS_IN_BLANKET_H)
add_definitions("-DDOLCEVITA")
if(HAVE_PIGS_IN_BLANKET_H)
set(SDL_VIDEO_OPENGL_ES2 1) set(SDL_VIDEO_OPENGL_ES2 1)
set(SDL_VIDEO_RENDER_VITA_GLES2 1) set(SDL_VIDEO_RENDER_VITA_GLES2 1)
else() list(APPEND EXTRA_LIBS
add_definitions("-DSCE_OK=0") pib
)
endif() endif()
set(SDL_VIDEO_RENDER_VITA_GXM 1) set(SDL_VIDEO_RENDER_VITA_GXM 1)
if(DOLCESDK)
list(APPEND EXTRA_LIBS
pib
SceGxm_stub
SceGxmInternalForVsh_stub
SceDisplay_stub
SceCtrl_stub
SceAppMgr_stub
SceAppMgrUser_stub
SceAudio_stub
SceSysmodule_stub
SceSharedFb_stub
SceDisplay_stub
SceDisplayUser_stub
SceCtrl_stub
SceIofilemgr_stub
SceCommonDialog_stub
SceTouch_stub
SceHid_stub
SceMotion_stub
m
)
else()
list(APPEND EXTRA_LIBS list(APPEND EXTRA_LIBS
SceGxm_stub SceGxm_stub
SceDisplay_stub SceDisplay_stub
@ -2126,7 +2107,6 @@ elseif(VITA)
m m
) )
endif() endif()
endif()
set(HAVE_ARMSIMD TRUE) set(HAVE_ARMSIMD TRUE)
set(SDL_ARM_SIMD_BLITTERS 1) set(SDL_ARM_SIMD_BLITTERS 1)

View File

@ -29,11 +29,7 @@
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#if DOLCEVITA
#include <psp2/kernel/iofilemgr.h>
#else
#include <psp2/io/stat.h> #include <psp2/io/stat.h>
#endif
#include <sys/types.h> #include <sys/types.h>
#include <limits.h> #include <limits.h>
#include <fcntl.h> #include <fcntl.h>

View File

@ -34,13 +34,8 @@ SDL_SYS_OpenURL(const char *url)
SDL_zero(boot_param); SDL_zero(boot_param);
sceAppUtilInit(&init_param, &boot_param); sceAppUtilInit(&init_param, &boot_param);
SDL_zero(browser_param); SDL_zero(browser_param);
#if DOLCEVITA
browser_param.wbstr = (SceChar8*)url;
browser_param.wbstrLength = strlen(url);
#else
browser_param.str = url; browser_param.str = url;
browser_param.strlen = strlen(url); browser_param.strlen = strlen(url);
#endif
sceAppUtilLaunchWebBrowser(&browser_param); sceAppUtilLaunchWebBrowser(&browser_param);
return 0; return 0;
} }

View File

@ -183,7 +183,7 @@ make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out,
&out->color &out->color
); );
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err);
return; return;
} }
@ -198,7 +198,7 @@ make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out,
&out->texture &out->texture
); );
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err);
return; return;
} }
@ -213,7 +213,7 @@ make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out,
&out->textureTint &out->textureTint
); );
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err);
return; return;
} }
@ -416,7 +416,7 @@ gxm_init(SDL_Renderer *renderer)
err = sceGxmInitialize(&initializeParams); err = sceGxmInitialize(&initializeParams);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "gxm init failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "gxm init failed: %d\n", err);
return err; return err;
} }
@ -462,7 +462,7 @@ gxm_init(SDL_Renderer *renderer)
data->contextParams.fragmentUsseRingBufferOffset = fragmentUsseRingBufferOffset; data->contextParams.fragmentUsseRingBufferOffset = fragmentUsseRingBufferOffset;
err = sceGxmCreateContext(&data->contextParams, &data->gxm_context); err = sceGxmCreateContext(&data->contextParams, &data->gxm_context);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create context failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create context failed: %d\n", err);
return err; return err;
} }
@ -479,7 +479,7 @@ gxm_init(SDL_Renderer *renderer)
// create the render target // create the render target
err = sceGxmCreateRenderTarget(&renderTargetParams, &data->renderTarget); err = sceGxmCreateRenderTarget(&renderTargetParams, &data->renderTarget);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "render target creation failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "render target creation failed: %d\n", err);
return err; return err;
} }
@ -516,7 +516,7 @@ gxm_init(SDL_Renderer *renderer)
data->displayBufferData[i] data->displayBufferData[i]
); );
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "color surface init failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "color surface init failed: %d\n", err);
return err; return err;
} }
@ -524,7 +524,7 @@ gxm_init(SDL_Renderer *renderer)
// create a sync object that we will associate with this buffer // create a sync object that we will associate with this buffer
err = sceGxmSyncObjectCreate(&data->displayBufferSync[i]); err = sceGxmSyncObjectCreate(&data->displayBufferSync[i]);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "sync object creation failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "sync object creation failed: %d\n", err);
return err; return err;
} }
@ -611,7 +611,7 @@ gxm_init(SDL_Renderer *renderer)
patcherParams.fragmentUsseOffset = patcherFragmentUsseOffset; patcherParams.fragmentUsseOffset = patcherFragmentUsseOffset;
err = sceGxmShaderPatcherCreate(&patcherParams, &data->shaderPatcher); err = sceGxmShaderPatcherCreate(&patcherParams, &data->shaderPatcher);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "shader patcher creation failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "shader patcher creation failed: %d\n", err);
return err; return err;
} }
@ -619,86 +619,86 @@ gxm_init(SDL_Renderer *renderer)
// check the shaders // check the shaders
err = sceGxmProgramCheck(clearVertexProgramGxp); err = sceGxmProgramCheck(clearVertexProgramGxp);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (clear vertex) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (clear vertex) failed: %d\n", err);
return err; return err;
} }
err = sceGxmProgramCheck(clearFragmentProgramGxp); err = sceGxmProgramCheck(clearFragmentProgramGxp);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (clear fragment) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (clear fragment) failed: %d\n", err);
return err; return err;
} }
err = sceGxmProgramCheck(colorVertexProgramGxp); err = sceGxmProgramCheck(colorVertexProgramGxp);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (color vertex) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (color vertex) failed: %d\n", err);
return err; return err;
} }
err = sceGxmProgramCheck(colorFragmentProgramGxp); err = sceGxmProgramCheck(colorFragmentProgramGxp);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (color fragment) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (color fragment) failed: %d\n", err);
return err; return err;
} }
err = sceGxmProgramCheck(textureVertexProgramGxp); err = sceGxmProgramCheck(textureVertexProgramGxp);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (texture vertex) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (texture vertex) failed: %d\n", err);
return err; return err;
} }
err = sceGxmProgramCheck(textureFragmentProgramGxp); err = sceGxmProgramCheck(textureFragmentProgramGxp);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (texture fragment) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (texture fragment) failed: %d\n", err);
return err; return err;
} }
err = sceGxmProgramCheck(textureTintFragmentProgramGxp); err = sceGxmProgramCheck(textureTintFragmentProgramGxp);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (texture tint fragment) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (texture tint fragment) failed: %d\n", err);
return err; return err;
} }
// register programs with the patcher // register programs with the patcher
err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, clearVertexProgramGxp, &data->clearVertexProgramId); err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, clearVertexProgramGxp, &data->clearVertexProgramId);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (clear vertex) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (clear vertex) failed: %d\n", err);
return err; return err;
} }
err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, clearFragmentProgramGxp, &data->clearFragmentProgramId); err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, clearFragmentProgramGxp, &data->clearFragmentProgramId);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (clear fragment) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (clear fragment) failed: %d\n", err);
return err; return err;
} }
err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, colorVertexProgramGxp, &data->colorVertexProgramId); err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, colorVertexProgramGxp, &data->colorVertexProgramId);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (color vertex) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (color vertex) failed: %d\n", err);
return err; return err;
} }
err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, colorFragmentProgramGxp, &data->colorFragmentProgramId); err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, colorFragmentProgramGxp, &data->colorFragmentProgramId);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (color fragment) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (color fragment) failed: %d\n", err);
return err; return err;
} }
err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, textureVertexProgramGxp, &data->textureVertexProgramId); err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, textureVertexProgramGxp, &data->textureVertexProgramId);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (texture vertex) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (texture vertex) failed: %d\n", err);
return err; return err;
} }
err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, textureFragmentProgramGxp, &data->textureFragmentProgramId); err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, textureFragmentProgramGxp, &data->textureFragmentProgramId);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (texture fragment) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (texture fragment) failed: %d\n", err);
return err; return err;
} }
err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, textureTintFragmentProgramGxp, &data->textureTintFragmentProgramId); err = sceGxmShaderPatcherRegisterProgram(data->shaderPatcher, textureTintFragmentProgramGxp, &data->textureTintFragmentProgramId);
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (texture tint fragment) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "register program (texture tint fragment) failed: %d\n", err);
return err; return err;
} }
@ -729,7 +729,7 @@ gxm_init(SDL_Renderer *renderer)
1, 1,
&data->clearVertexProgram &data->clearVertexProgram
); );
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (clear vertex) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (clear vertex) failed: %d\n", err);
return err; return err;
} }
@ -743,7 +743,7 @@ gxm_init(SDL_Renderer *renderer)
clearVertexProgramGxp, clearVertexProgramGxp,
&data->clearFragmentProgram &data->clearFragmentProgram
); );
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (clear fragment) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (clear fragment) failed: %d\n", err);
return err; return err;
} }
@ -815,7 +815,7 @@ gxm_init(SDL_Renderer *renderer)
1, 1,
&data->colorVertexProgram &data->colorVertexProgram
); );
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (color vertex) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (color vertex) failed: %d\n", err);
return err; return err;
} }
@ -856,7 +856,7 @@ gxm_init(SDL_Renderer *renderer)
1, 1,
&data->textureVertexProgram &data->textureVertexProgram
); );
if (err != SCE_OK) { if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (texture vertex) failed: %d\n", err); SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (texture vertex) failed: %d\n", err);
return err; return err;
} }

View File

@ -28,9 +28,6 @@
#include "SDL_vitasensor.h" #include "SDL_vitasensor.h"
#include "../SDL_syssensor.h" #include "../SDL_syssensor.h"
#include <psp2/motion.h> #include <psp2/motion.h>
#if DOLCEVITA
#include <psp2/error.h>
#endif
#if !defined(SCE_MOTION_MAX_NUM_STATES) #if !defined(SCE_MOTION_MAX_NUM_STATES)
#define SCE_MOTION_MAX_NUM_STATES 64 #define SCE_MOTION_MAX_NUM_STATES 64
@ -143,12 +140,12 @@ SDL_VITA_SensorOpen(SDL_Sensor *sensor, int device_index)
static void static void
SDL_VITA_SensorUpdate(SDL_Sensor *sensor) SDL_VITA_SensorUpdate(SDL_Sensor *sensor)
{ {
int err = SCE_OK; int err = 0;
SceMotionSensorState motionState[SCE_MOTION_MAX_NUM_STATES]; SceMotionSensorState motionState[SCE_MOTION_MAX_NUM_STATES];
SDL_memset(motionState, 0, sizeof(motionState)); SDL_memset(motionState, 0, sizeof(motionState));
err = sceMotionGetSensorState(motionState, SCE_MOTION_MAX_NUM_STATES); err = sceMotionGetSensorState(motionState, SCE_MOTION_MAX_NUM_STATES);
if (err != SCE_OK) if (err != 0)
{ {
return; return;
} }