Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/audaspace/Python/AUD_PyAPI.cpp1
-rw-r--r--source/blender/editors/interface/interface_style.c10
-rw-r--r--source/blender/render/intern/source/convertblender.c2
3 files changed, 10 insertions, 3 deletions
diff --git a/intern/audaspace/Python/AUD_PyAPI.cpp b/intern/audaspace/Python/AUD_PyAPI.cpp
index 1fccafa2599..22376a2fcd1 100644
--- a/intern/audaspace/Python/AUD_PyAPI.cpp
+++ b/intern/audaspace/Python/AUD_PyAPI.cpp
@@ -2214,6 +2214,7 @@ Device_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
switch(device)
{
case AUD_DEVICE_NULL:
+ (void)specs; /* quiet warning when others disabled */
self->device = new AUD_NULLDevice();
break;
case AUD_DEVICE_OPENAL:
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 7be089fdf32..2e4106b3c04 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -153,10 +153,16 @@ void uiStyleFontDrawExt(uiFontStyle *fs, rcti *rect, const char *str,
height= BLF_height(fs->uifont_id, "2"); /* correct offset is on baseline, the j is below that */
yofs= floor( 0.5f*(rect->ymax - rect->ymin - height));
- if(fs->align==UI_STYLE_TEXT_CENTER)
+ if(fs->align==UI_STYLE_TEXT_CENTER) {
xofs= floor( 0.5f*(rect->xmax - rect->xmin - BLF_width(fs->uifont_id, str)));
- else if(fs->align==UI_STYLE_TEXT_RIGHT)
+ /* don't center text if it chops off the start of the text, 2 gives some margin */
+ if(xofs < 2) {
+ xofs= 2;
+ }
+ }
+ else if(fs->align==UI_STYLE_TEXT_RIGHT) {
xofs= rect->xmax - rect->xmin - BLF_width(fs->uifont_id, str) - 1;
+ }
/* clip is very strict, so we give it some space */
BLF_clipping(fs->uifont_id, rect->xmin-1, rect->ymin-4, rect->xmax+1, rect->ymax+4);
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index bc066de7df1..adbcc7c5e72 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -548,7 +548,7 @@ static void GetTextureCoordinate(const SMikkTSpaceContext * pContext, float fUV[
coord= tface->uv[vert_index];
fUV[0]= coord[0]; fUV[1]= coord[1];
}
- else if(1 || (coord= (&vlr->v1)[vert_index]->orco)) {
+ else if((coord= (&vlr->v1)[vert_index]->orco)) {
map_to_sphere(&fUV[0], &fUV[1], coord[0], coord[1], coord[2]);
}
else { /* else we get un-initialized value, 0.0 ok default? */