1
0
Эх сурвалжийг харах

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.
jp9000 11 жил өмнө
parent
commit
94a2d20712

+ 3 - 3
libobs/graphics/effect.c

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

+ 8 - 8
libobs/graphics/graphics.c

@@ -226,7 +226,7 @@ void gs_matrix_pop(void)
 		return;
 
 	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;
 	}
 
@@ -397,22 +397,22 @@ void gs_renderstop(enum gs_draw_mode mode)
 
 	if (graphics->norms.num &&
 	    (graphics->norms.num != graphics->verts.num)) {
-		blog(LOG_WARNING, "gs_renderstop: normal count does "
-		                  "not match vertex count");
+		blog(LOG_ERROR, "gs_renderstop: normal count does "
+		                "not match vertex count");
 		num = min_size(num, graphics->norms.num);
 	}
 
 	if (graphics->colors.num &&
 	    (graphics->colors.num != graphics->verts.num)) {
-		blog(LOG_WARNING, "gs_renderstop: color count does "
-		                  "not match vertex count");
+		blog(LOG_ERROR, "gs_renderstop: color count does "
+		                "not match vertex count");
 		num = min_size(num, graphics->colors.num);
 	}
 
 	if (graphics->texverts[0].num &&
 	    (graphics->texverts[0].num  != graphics->verts.num)) {
-		blog(LOG_WARNING, "gs_renderstop: texture vertex count does "
-		                  "not match vertex count");
+		blog(LOG_ERROR, "gs_renderstop: texture vertex count does "
+		                "not match vertex count");
 		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;
 
 	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;
 	}