mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 21:17:43 +00:00
Support for viewing BMP files in File Manager and setting as Splash screen (#1242)
* Use filesystem::path type vs string for BMP file name * Use filesystem::path type vs string for BMP files * Use a global const file path string for "/splash.bmp" * Support for viewing BMP files and setting as Splash screen * Support for viewing BMP files and setting as Splash screen * Support for viewing BMP files and setting as Splash screen * Update ui_ss_viewer.cpp * Update ui_ss_viewer.hpp
This commit is contained in:
@@ -412,7 +412,7 @@ void ILI9341::drawBMP(const ui::Point p, const uint8_t* bitmap, const bool trans
|
||||
24bpp RGB
|
||||
32bpp ARGB
|
||||
*/
|
||||
bool ILI9341::drawBMP2(const ui::Point p, const std::string file) {
|
||||
bool ILI9341::drawBMP2(const ui::Point p, const std::filesystem::path& file) {
|
||||
File bmpimage;
|
||||
size_t file_pos = 0;
|
||||
uint16_t pointer = 0;
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "ui_text.hpp"
|
||||
#include "file.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
@@ -58,7 +59,7 @@ class ILI9341 {
|
||||
|
||||
void draw_pixel(const ui::Point p, const ui::Color color);
|
||||
void drawBMP(const ui::Point p, const uint8_t* bitmap, const bool transparency);
|
||||
bool drawBMP2(const ui::Point p, const std::string file);
|
||||
bool drawBMP2(const ui::Point p, const std::filesystem::path& file);
|
||||
void render_line(const ui::Point p, const uint8_t count, const ui::Color* line_buffer);
|
||||
void render_box(const ui::Point p, const ui::Size s, const ui::Color* line_buffer);
|
||||
|
||||
|
Reference in New Issue
Block a user