From e58a955e68f30f332cf3e4e6656ef4c6e0ff6387 Mon Sep 17 00:00:00 2001 From: Ivan Epifanov Date: Mon, 8 Mar 2021 18:39:00 +0300 Subject: [PATCH] Deprecate dolcesdk --- CMakeLists.txt | 68 +++++++------------ src/filesystem/vita/SDL_sysfilesystem.c | 4 -- src/misc/vita/SDL_sysurl.c | 5 -- .../vitagxm/SDL_render_vita_gxm_tools.c | 54 +++++++-------- src/sensor/vita/SDL_vitasensor.c | 7 +- 5 files changed, 53 insertions(+), 85 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 228a5da4c..1d4b9f236 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2077,55 +2077,35 @@ 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 - SceCtrl_stub - SceAppMgr_stub - SceAudio_stub - SceSysmodule_stub - SceDisplay_stub - SceCtrl_stub - SceIofilemgr_stub - SceCommonDialog_stub - SceTouch_stub - SceHid_stub - SceMotion_stub - m - ) - endif() + list(APPEND EXTRA_LIBS + SceGxm_stub + SceDisplay_stub + SceCtrl_stub + SceAppMgr_stub + SceAudio_stub + SceSysmodule_stub + SceDisplay_stub + SceCtrl_stub + SceIofilemgr_stub + SceCommonDialog_stub + SceTouch_stub + SceHid_stub + SceMotion_stub + m + ) endif() set(HAVE_ARMSIMD TRUE) diff --git a/src/filesystem/vita/SDL_sysfilesystem.c b/src/filesystem/vita/SDL_sysfilesystem.c index b382bc902..fd790a5d0 100644 --- a/src/filesystem/vita/SDL_sysfilesystem.c +++ b/src/filesystem/vita/SDL_sysfilesystem.c @@ -29,11 +29,7 @@ #include #include #include -#if DOLCEVITA -#include -#else #include -#endif #include #include #include diff --git a/src/misc/vita/SDL_sysurl.c b/src/misc/vita/SDL_sysurl.c index 788480e16..42f6c456e 100644 --- a/src/misc/vita/SDL_sysurl.c +++ b/src/misc/vita/SDL_sysurl.c @@ -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; } diff --git a/src/render/vitagxm/SDL_render_vita_gxm_tools.c b/src/render/vitagxm/SDL_render_vita_gxm_tools.c index e98d826fe..349e48fcf 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm_tools.c +++ b/src/render/vitagxm/SDL_render_vita_gxm_tools.c @@ -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; } diff --git a/src/sensor/vita/SDL_vitasensor.c b/src/sensor/vita/SDL_vitasensor.c index da6555235..72b41fee3 100644 --- a/src/sensor/vita/SDL_vitasensor.c +++ b/src/sensor/vita/SDL_vitasensor.c @@ -28,9 +28,6 @@ #include "SDL_vitasensor.h" #include "../SDL_syssensor.h" #include -#if DOLCEVITA -#include -#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; }