diff --git a/src/TextDrawer.cpp b/src/TextDrawer.cpp index 09adabfb..13eff7de 100644 --- a/src/TextDrawer.cpp +++ b/src/TextDrawer.cpp @@ -346,7 +346,8 @@ void TextDrawer::drawText(const char *_pText, float _x, float _y) const gfxContext.setBlending(blend::SRC_ALPHA, blend::ONE_MINUS_SRC_ALPHA); m_program->activate(); - gfxContext.setViewport(0, 0, wnd.getWidth(), wnd.getHeight()); + gfxContext.setViewport((wnd.getScreenWidth() - wnd.getWidth()) / 2, (wnd.getScreenHeight() - wnd.getHeight()) / 2 + wnd.getHeightOffset(), + wnd.getWidth(), wnd.getHeight()); gSP.changed |= CHANGED_VIEWPORT; Context::TexParameters setParams;