Deprecate dolcesdk

This commit is contained in:
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(HAVE_SDL_VIDEO TRUE)
if(DOLCESDK)
add_definitions("-DDOLCEVITA")
check_include_file(pib.h HAVE_PIGS_IN_BLANKET_H)
if(HAVE_PIGS_IN_BLANKET_H)
set(SDL_VIDEO_OPENGL_ES2 1)
set(SDL_VIDEO_RENDER_VITA_GLES2 1)
else()
add_definitions("-DSCE_OK=0")
list(APPEND EXTRA_LIBS
pib
)
endif()
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
SceGxm_stub
SceDisplay_stub
@ -2126,7 +2107,6 @@ elseif(VITA)
m
)
endif()
endif()
set(HAVE_ARMSIMD TRUE)
set(SDL_ARM_SIMD_BLITTERS 1)

View file

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

View file

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

View file

@ -183,7 +183,7 @@ make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out,
&out->color
);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err);
return;
}
@ -198,7 +198,7 @@ make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out,
&out->texture
);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err);
return;
}
@ -213,7 +213,7 @@ make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out,
&out->textureTint
);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err);
return;
}
@ -416,7 +416,7 @@ gxm_init(SDL_Renderer *renderer)
err = sceGxmInitialize(&initializeParams);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "gxm init failed: %d\n", err);
return err;
}
@ -462,7 +462,7 @@ gxm_init(SDL_Renderer *renderer)
data->contextParams.fragmentUsseRingBufferOffset = fragmentUsseRingBufferOffset;
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);
return err;
}
@ -479,7 +479,7 @@ gxm_init(SDL_Renderer *renderer)
// create the render target
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);
return err;
}
@ -516,7 +516,7 @@ gxm_init(SDL_Renderer *renderer)
data->displayBufferData[i]
);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "color surface init failed: %d\n", err);
return err;
}
@ -524,7 +524,7 @@ gxm_init(SDL_Renderer *renderer)
// create a sync object that we will associate with this buffer
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);
return err;
}
@ -611,7 +611,7 @@ gxm_init(SDL_Renderer *renderer)
patcherParams.fragmentUsseOffset = patcherFragmentUsseOffset;
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);
return err;
}
@ -619,86 +619,86 @@ gxm_init(SDL_Renderer *renderer)
// check the shaders
err = sceGxmProgramCheck(clearVertexProgramGxp);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (clear vertex) failed: %d\n", err);
return err;
}
err = sceGxmProgramCheck(clearFragmentProgramGxp);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (clear fragment) failed: %d\n", err);
return err;
}
err = sceGxmProgramCheck(colorVertexProgramGxp);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (color vertex) failed: %d\n", err);
return err;
}
err = sceGxmProgramCheck(colorFragmentProgramGxp);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (color fragment) failed: %d\n", err);
return err;
}
err = sceGxmProgramCheck(textureVertexProgramGxp);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (texture vertex) failed: %d\n", err);
return err;
}
err = sceGxmProgramCheck(textureFragmentProgramGxp);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "check program (texture fragment) failed: %d\n", err);
return err;
}
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);
return err;
}
// register programs with the patcher
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);
return err;
}
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);
return err;
}
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);
return err;
}
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);
return err;
}
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);
return err;
}
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);
return err;
}
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);
return err;
}
@ -729,7 +729,7 @@ gxm_init(SDL_Renderer *renderer)
1,
&data->clearVertexProgram
);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (clear vertex) failed: %d\n", err);
return err;
}
@ -743,7 +743,7 @@ gxm_init(SDL_Renderer *renderer)
clearVertexProgramGxp,
&data->clearFragmentProgram
);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (clear fragment) failed: %d\n", err);
return err;
}
@ -815,7 +815,7 @@ gxm_init(SDL_Renderer *renderer)
1,
&data->colorVertexProgram
);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (color vertex) failed: %d\n", err);
return err;
}
@ -856,7 +856,7 @@ gxm_init(SDL_Renderer *renderer)
1,
&data->textureVertexProgram
);
if (err != SCE_OK) {
if (err != 0) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (texture vertex) failed: %d\n", err);
return err;
}

View file

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