From 93e46ad42658fd61104d0c3998ec5c7da2042179 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 2 May 2018 14:57:21 -0700 Subject: screen_ui: Use std::string in DrawTextLine() and siblings. Test: mmma -j bootable/recovery Test: Build and boot into recovery image on angler. Check the UI. Test: Repeat the same test on devices using wearable UI. Change-Id: I1a67ff4ae8de4d7a8dc66326cf07f95c89e95152 --- vr_ui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vr_ui.cpp') diff --git a/vr_ui.cpp b/vr_ui.cpp index a58c99efd..b1ef646c9 100644 --- a/vr_ui.cpp +++ b/vr_ui.cpp @@ -39,9 +39,9 @@ void VrRecoveryUI::DrawTextIcon(int x, int y, GRSurface* surface) const { gr_texticon(x - kStereoOffset + ScreenWidth(), y, surface); } -int VrRecoveryUI::DrawTextLine(int x, int y, const char* line, bool bold) const { - gr_text(gr_sys_font(), x + kStereoOffset, y, line, bold); - gr_text(gr_sys_font(), x - kStereoOffset + ScreenWidth(), y, line, bold); +int VrRecoveryUI::DrawTextLine(int x, int y, const std::string& line, bool bold) const { + gr_text(gr_sys_font(), x + kStereoOffset, y, line.c_str(), bold); + gr_text(gr_sys_font(), x - kStereoOffset + ScreenWidth(), y, line.c_str(), bold); return char_height_ + 4; } -- cgit v1.2.3