aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/Twos.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix potential buffer overflows when calling sprintfMingjie Shen2023-12-011-1/+1
| | | | | | | | | | 1. Replace sprintf with snprintf, which is safer 2. An unsigned int or unsigned long int requires 11 bytes to print (including the null terminator) 3. Use PRIu16 macro to print uint16_t 4. Format string "#%2d %2d:%02d:%02d.%02d\n" in StopWatch::stopLapBtnEventHandler() requires at least 17 bytes. The 16-byte buffer would clearly be overrun if sprintf were used.
* screens: Remove unused DisplayApp parametersRiku Isokoski2023-02-251-1/+1
|
* screens: Remove explicit Screen constructorsRiku Isokoski2023-02-251-1/+1
| | | | | This constructor didn't do anything since DisplayApp reference was removed from the Screen base class.
* Reduce duplication in Twos (#1274)Riku Isokoski2022-09-111-46/+25
|
* Twos code cleanup (#1220)Riku Isokoski2022-07-061-103/+105
|
* Force full screen refresh with a rounder functionRiku Isokoski2022-05-081-6/+0
| | | | | | When the screen switches, the full screen needs to be refreshed for the hardware scrolling to work. This was enforced with backgroundLabels, but is simpler to do with a rounder function.
* Replace lv_label_set_text where possibleRiku Isokoski2022-04-181-1/+1
|
* Twos: fix warning about extra paranthesisReinhold Gschweicher2022-03-131-1/+1
| | | | | | | | | | | | | | We have a comparison like `if (( a == b ))`, which is a parenthesis too much, which generates the following warning ``` InfiniTime/src/displayapp/screens/Twos.cpp:133:35: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((grid[newRow][newCol].value == grid[oldRow][oldCol].value)) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ InfiniTime/src/displayapp/screens/Twos.cpp:133:35: note: remove extraneous parentheses around the comparison to silence this warning if ((grid[newRow][newCol].value == grid[oldRow][oldCol].value)) { ~ ^ ~ ```
* Improved format specifiers, bracing, removed C-style casts, whitespace fixes ↵Avamander2021-12-091-3/+3
| | | | and removed Tiles shadowing
* Update includes to to be relative to src directoryReinhold Gschweicher2021-11-151-1/+1
| | | | | | | Don't use relative imports like `../foo.h` as those depend on the relative position of both files. Rather than that use imports relative to the `src` directory, which explicitly is part of the include directories.
* Memory savings by replacing stringsRiku Isokoski2021-10-291-5/+7
|
* Refresh reworkRiku Isokoski2021-07-191-5/+1
|
* Reformatted all the files according to clang-format styleAvamander2021-04-241-66/+71
|
* fix style formatting in 2048 gamepetter2021-04-161-2/+7
|
* restore battery bufferJoaquim2021-04-081-2/+1
|
* Big UI and navigation RewriteJoaquim2021-04-041-5/+0
| | | | | | | | | | | new navigation add some color to the apps redesign menus new settings menu new quick settings code clean up size reduction by converting navigation images to font and more...
* LVGL v7.10.0Joaquim2021-01-281-37/+60
|
* adds 2048 clone gameJed2021-01-021-0/+271
styles table reads touch events allows moving tiles allows merging tiles improves tile movement allows merging tiles adds score display implements color edit comments adjust game logic disallows double merges