mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-24 05:43:11 -05:00
Prepare for display orientation part 1 (#2661)
This commit is contained in:
parent
6f6d863a14
commit
a1d7cf2b86
85 changed files with 405 additions and 334 deletions
|
|
@ -182,7 +182,7 @@ static void cmd_screenshot(BaseSequentialStream* chp, int argc, char* argv[]) {
|
|||
return;
|
||||
|
||||
for (int i = 0; i < ui::screen_height; i++) {
|
||||
std::array<ui::ColorRGB888, ui::screen_width> row;
|
||||
std::vector<ui::ColorRGB888> row(ui::screen_width);
|
||||
portapack::display.read_pixels({0, i, ui::screen_width, 1}, row);
|
||||
png.write_scanline(row);
|
||||
}
|
||||
|
|
@ -199,7 +199,7 @@ static void cmd_screenframe(BaseSequentialStream* chp, int argc, char* argv[]) {
|
|||
evtd->enter_shell_working_mode();
|
||||
|
||||
for (int i = 0; i < ui::screen_height; i++) {
|
||||
std::array<ui::ColorRGB888, ui::screen_width> row;
|
||||
std::vector<ui::ColorRGB888> row(ui::screen_width);
|
||||
portapack::display.read_pixels({0, i, ui::screen_width, 1}, row);
|
||||
for (int px = 0; px < ui::screen_width; px += 5) {
|
||||
char buffer[5 * 3 * 2 + 1];
|
||||
|
|
@ -242,9 +242,9 @@ static void cmd_screenframeshort(BaseSequentialStream* chp, int argc, char* argv
|
|||
char buffer[USBSERIAL_BUFFERS_SIZE];
|
||||
size_t wp = 0;
|
||||
for (int y = 0; y < ui::screen_height; y++) {
|
||||
std::array<ui::ColorRGB888, ui::screen_width> row;
|
||||
std::vector<ui::ColorRGB888> row(ui::screen_width);
|
||||
portapack::display.read_pixels({0, y, ui::screen_width, 1}, row);
|
||||
for (int i = 0; i < 240; ++i) {
|
||||
for (int i = 0; i < ui::screen_width; ++i) {
|
||||
screenbuffer_helper_add(chp, buffer, wp, getChrFromRgb(row[i].r, row[i].g, row[i].b));
|
||||
}
|
||||
screenbuffer_helper_add(chp, buffer, wp, '\r');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue