mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-06 07:20:48 +00:00
Fix stdlib usage
This commit is contained in:
parent
80da805688
commit
76f28ea120
4 changed files with 9 additions and 9 deletions
|
@ -283,7 +283,7 @@ static uint32_t param_clear(struct spa_list *param_list, uint32_t id)
|
||||||
spa_list_for_each_safe(p, t, param_list, link) {
|
spa_list_for_each_safe(p, t, param_list, link) {
|
||||||
if (id == SPA_ID_INVALID || p->id == id) {
|
if (id == SPA_ID_INVALID || p->id == id) {
|
||||||
spa_list_remove(&p->link);
|
spa_list_remove(&p->link);
|
||||||
free(p);
|
free(p); // This should NOT be SDL_free()
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ static struct param *param_add(struct spa_list *params,
|
||||||
p->seq = seq;
|
p->seq = seq;
|
||||||
if (param != NULL) {
|
if (param != NULL) {
|
||||||
p->param = SPA_PTROFF(p, sizeof(*p), struct spa_pod);
|
p->param = SPA_PTROFF(p, sizeof(*p), struct spa_pod);
|
||||||
memcpy(p->param, param, SPA_POD_SIZE(param));
|
SDL_memcpy(p->param, param, SPA_POD_SIZE(param));
|
||||||
} else {
|
} else {
|
||||||
param_clear(params, id);
|
param_clear(params, id);
|
||||||
p->param = NULL;
|
p->param = NULL;
|
||||||
|
@ -339,7 +339,7 @@ static void param_update(struct spa_list *param_list, struct spa_list *pending_l
|
||||||
p->seq != SPA_PARAMS_INFO_SEQ(params[i]) &&
|
p->seq != SPA_PARAMS_INFO_SEQ(params[i]) &&
|
||||||
p->param != NULL) {
|
p->param != NULL) {
|
||||||
spa_list_remove(&p->link);
|
spa_list_remove(&p->link);
|
||||||
free(p);
|
free(p); // This should NOT be SDL_free()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ static void param_update(struct spa_list *param_list, struct spa_list *pending_l
|
||||||
spa_list_remove(&p->link);
|
spa_list_remove(&p->link);
|
||||||
if (p->param == NULL) {
|
if (p->param == NULL) {
|
||||||
param_clear(param_list, p->id);
|
param_clear(param_list, p->id);
|
||||||
free(p);
|
free(p); // This should NOT be SDL_free()
|
||||||
} else {
|
} else {
|
||||||
spa_list_append(param_list, &p->link);
|
spa_list_append(param_list, &p->link);
|
||||||
}
|
}
|
||||||
|
@ -840,7 +840,7 @@ static void proxy_destroy(void *data)
|
||||||
}
|
}
|
||||||
param_clear(&g->param_list, SPA_ID_INVALID);
|
param_clear(&g->param_list, SPA_ID_INVALID);
|
||||||
param_clear(&g->pending_list, SPA_ID_INVALID);
|
param_clear(&g->pending_list, SPA_ID_INVALID);
|
||||||
free(g->name);
|
free(g->name); // This should NOT be SDL_free()
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct pw_proxy_events proxy_events = {
|
static const struct pw_proxy_events proxy_events = {
|
||||||
|
|
|
@ -1526,7 +1526,7 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetenv)(
|
||||||
|
|
||||||
// This is only called at startup, to initialize the environment
|
// This is only called at startup, to initialize the environment
|
||||||
// Note that we call setenv() directly to avoid affecting SDL environments
|
// Note that we call setenv() directly to avoid affecting SDL environments
|
||||||
setenv(utfname, utfvalue, 1);
|
setenv(utfname, utfvalue, 1); // This should NOT be SDL_setenv()
|
||||||
|
|
||||||
(*env)->ReleaseStringUTFChars(env, name, utfname);
|
(*env)->ReleaseStringUTFChars(env, name, utfname);
|
||||||
(*env)->ReleaseStringUTFChars(env, value, utfvalue);
|
(*env)->ReleaseStringUTFChars(env, value, utfvalue);
|
||||||
|
|
|
@ -300,7 +300,7 @@
|
||||||
". [SDL] In performDragOperation, desiredType '%s', "
|
". [SDL] In performDragOperation, desiredType '%s', "
|
||||||
"Submitting DropText as (%lu) '%s'\n",
|
"Submitting DropText as (%lu) '%s'\n",
|
||||||
[[desiredType description] UTF8String],
|
[[desiredType description] UTF8String],
|
||||||
strlen(token), token);
|
SDL_strlen(token), token);
|
||||||
if (!SDL_SendDropText(sdlwindow, token)) {
|
if (!SDL_SendDropText(sdlwindow, token)) {
|
||||||
SDL_free(buffer);
|
SDL_free(buffer);
|
||||||
return NO;
|
return NO;
|
||||||
|
|
|
@ -255,7 +255,7 @@ bool HAIKU_GetDisplayModes(SDL_VideoDevice *_this, SDL_VideoDisplay *display)
|
||||||
SDL_AddFullscreenDisplayMode(display, &mode);
|
SDL_AddFullscreenDisplayMode(display, &mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(bmodes); // This should not be SDL_free()
|
free(bmodes); // This should NOT be SDL_free()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ bool HAIKU_SetDisplayMode(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL
|
||||||
return SDL_SetError("Bad video mode");
|
return SDL_SetError("Bad video mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
free(bmode_list); // This should not be SDL_free()
|
free(bmode_list); // This should NOT be SDL_free()
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_OPENGL
|
#ifdef SDL_VIDEO_OPENGL
|
||||||
/* FIXME: Is there some way to reboot the OpenGL context? This doesn't
|
/* FIXME: Is there some way to reboot the OpenGL context? This doesn't
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue