summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-13 09:56:25 +0000
committerrubidium <rubidium@openttd.org>2010-11-13 09:56:25 +0000
commit30637a8340844abce2aab469295b4160d1f2d532 (patch)
tree9fd08dd8b612649aa6e27fa4f36ca4be3b587e97 /src/gfx.cpp
parent43f807a9189a1dde0260f40f8553bcc8050a3e1d (diff)
downloadopenttd-30637a8340844abce2aab469295b4160d1f2d532.tar.xz
(svn r21157) -Codechange: remove information about the text direction out of the language "list"
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index e28255db2..44c480cfb 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -346,7 +346,7 @@ static UChar *HandleBiDiAndArabicShapes(UChar *buffer)
UBiDi *para = ubidi_openSized((int32_t)length, 0, &err);
if (para == NULL) return buffer;
- ubidi_setPara(para, input_output, (int32_t)length, _dynlang.text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, NULL, &err);
+ ubidi_setPara(para, input_output, (int32_t)length, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, NULL, &err);
ubidi_writeReordered(para, intermediate, (int32_t)length, UBIDI_REMOVE_BIDI_CONTROLS, &err);
length = u_shapeArabic(intermediate, (int32_t)length, input_output, lengthof(input_output), U_SHAPE_TEXT_DIRECTION_VISUAL_LTR | U_SHAPE_LETTERS_SHAPE, &err);
ubidi_close(para);
@@ -555,7 +555,7 @@ static int DrawString(int left, int right, int top, char *str, const char *last,
}
/* In case we have a RTL language we swap the alignment. */
- if (!(align & SA_FORCE) && _dynlang.text_dir == TD_RTL && !(align & SA_STRIP) && (align & SA_HOR_MASK) != SA_HOR_CENTER) align ^= SA_RIGHT;
+ if (!(align & SA_FORCE) && _current_text_dir == TD_RTL && !(align & SA_STRIP) && (align & SA_HOR_MASK) != SA_HOR_CENTER) align ^= SA_RIGHT;
for (UChar **iter = setx_offsets.Begin(); iter != setx_offsets.End(); iter++) {
UChar *to_draw = *iter;