diff options
| author | Kieran Cawthray <kieranc@gmail.com> | 2021-11-07 17:49:54 +0100 |
|---|---|---|
| committer | Kieran Cawthray <kieranc@gmail.com> | 2021-11-07 17:49:54 +0100 |
| commit | 18e3cc7038d0f6c0cebc5d042e0740f968f890db (patch) | |
| tree | 4fd50ddece4d92c06ea0e16cc06902703a2b6202 /src/displayapp/screens/Twos.cpp | |
| parent | 85d494a987e8edfd51fbb0eb6dfa04ea108cbb48 (diff) | |
| parent | 4a5b5f954f12de1574af8e3efec094bb4bdbb542 (diff) | |
Merge remote-tracking branch 'upstream/develop' into pts-settings
Diffstat (limited to 'src/displayapp/screens/Twos.cpp')
| -rw-r--r-- | src/displayapp/screens/Twos.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/displayapp/screens/Twos.cpp b/src/displayapp/screens/Twos.cpp index 4201d501..d12ef906 100644 --- a/src/displayapp/screens/Twos.cpp +++ b/src/displayapp/screens/Twos.cpp @@ -1,10 +1,10 @@ #include "Twos.h" -#include <lvgl/lvgl.h> -#include <string> -#include <charconv> #include <array> -#include <vector> +#include <cstdio> +#include <cstdlib> +#include <lvgl/lvgl.h> #include <utility> +#include <vector> using namespace Pinetime::Applications::Screens; @@ -265,7 +265,9 @@ void Twos::updateGridDisplay(Tile grid[][4]) { for (int row = 0; row < 4; row++) { for (int col = 0; col < 4; col++) { if (grid[row][col].value) { - lv_table_set_cell_value(gridDisplay, row, col, (std::to_string(grid[row][col].value)).c_str()); + char buffer[7]; + sprintf(buffer, "%d", grid[row][col].value); + lv_table_set_cell_value(gridDisplay, row, col, buffer); } else { lv_table_set_cell_value(gridDisplay, row, col, ""); } |
