Deprecate dolcesdk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 228a5da..1d4b9f2 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")
- 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()
+ set(SDL_VIDEO_RENDER_VITA_GXM 1)
+
+ 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 b382bc9..fd790a5 100644
--- a/src/filesystem/vita/SDL_sysfilesystem.c
+++ b/src/filesystem/vita/SDL_sysfilesystem.c
@@ -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>
diff --git a/src/misc/vita/SDL_sysurl.c b/src/misc/vita/SDL_sysurl.c
index 788480e..42f6c45 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 e98d826..349e48f 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 da65552..72b41fe 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 <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;
}