0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

Be just a bit more consistent.

See, it can sometimes be a bit confusing.  These functions should
definitely not fail under normal circumstances, and these errors may
affect the user and/or application in some way.
This commit is contained in:
jp9000 2014-02-28 20:07:56 -07:00
parent 771eac6015
commit 94a2d20712
2 changed files with 11 additions and 11 deletions

View File

@ -268,17 +268,17 @@ static inline void effect_setval_inline(effect_t effect, eparam_t param,
bool size_changed; bool size_changed;
if (!effect) { if (!effect) {
blog(LOG_WARNING, "effect_setval_inline: invalid effect"); blog(LOG_ERROR, "effect_setval_inline: invalid effect");
return; return;
} }
if (!param) { if (!param) {
blog(LOG_WARNING, "effect_setval_inline: invalid param"); blog(LOG_ERROR, "effect_setval_inline: invalid param");
return; return;
} }
if (!data) { if (!data) {
blog(LOG_WARNING, "effect_setval_inline: invalid data"); blog(LOG_ERROR, "effect_setval_inline: invalid data");
return; return;
} }

View File

@ -226,7 +226,7 @@ void gs_matrix_pop(void)
return; return;
if (graphics->cur_matrix == 0) { if (graphics->cur_matrix == 0) {
blog(LOG_WARNING, "Tried to pop last matrix on stack"); blog(LOG_ERROR, "Tried to pop last matrix on stack");
return; return;
} }
@ -397,21 +397,21 @@ void gs_renderstop(enum gs_draw_mode mode)
if (graphics->norms.num && if (graphics->norms.num &&
(graphics->norms.num != graphics->verts.num)) { (graphics->norms.num != graphics->verts.num)) {
blog(LOG_WARNING, "gs_renderstop: normal count does " blog(LOG_ERROR, "gs_renderstop: normal count does "
"not match vertex count"); "not match vertex count");
num = min_size(num, graphics->norms.num); num = min_size(num, graphics->norms.num);
} }
if (graphics->colors.num && if (graphics->colors.num &&
(graphics->colors.num != graphics->verts.num)) { (graphics->colors.num != graphics->verts.num)) {
blog(LOG_WARNING, "gs_renderstop: color count does " blog(LOG_ERROR, "gs_renderstop: color count does "
"not match vertex count"); "not match vertex count");
num = min_size(num, graphics->colors.num); num = min_size(num, graphics->colors.num);
} }
if (graphics->texverts[0].num && if (graphics->texverts[0].num &&
(graphics->texverts[0].num != graphics->verts.num)) { (graphics->texverts[0].num != graphics->verts.num)) {
blog(LOG_WARNING, "gs_renderstop: texture vertex count does " blog(LOG_ERROR, "gs_renderstop: texture vertex count does "
"not match vertex count"); "not match vertex count");
num = min_size(num, graphics->texverts[0].num); num = min_size(num, graphics->texverts[0].num);
} }
@ -775,7 +775,7 @@ void gs_draw_sprite(texture_t tex, uint32_t flip, uint32_t width,
return; return;
if (gs_gettexturetype(tex) != GS_TEXTURE_2D) { if (gs_gettexturetype(tex) != GS_TEXTURE_2D) {
blog(LOG_WARNING, "A sprite must be a 2D texture"); blog(LOG_ERROR, "A sprite must be a 2D texture");
return; return;
} }