Skip to content

Commit

Permalink
minor code formatting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
stevesims committed Jan 16, 2025
1 parent f384602 commit 1e5fa08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions video/vdu_buffered.h
Original file line number Diff line number Diff line change
Expand Up @@ -2117,8 +2117,8 @@ void VDUStreamProcessor::bufferTransformBitmap(uint16_t bufferId, uint8_t option

debug_log("bufferTransformBitmap: width %d, height %d, xOffset %d, yOffset %d\n\r", width, height, xOffset, yOffset);

for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
// calculate the source pixel
// NB we will need to adjust x,y here if we are auto-translating
pos[0] = (float)x + xOffset;
Expand All @@ -2130,7 +2130,7 @@ void VDUStreamProcessor::bufferTransformBitmap(uint16_t bufferId, uint8_t option
}
destination[(int)y * width + (int)x] = srcPixel;
}
}
}

// save new bitmap data to target buffer
bufferClear(bufferId);
Expand Down
8 changes: 5 additions & 3 deletions video/video.ino
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ void processLoop(void * parameter) {

while (true) {
#ifdef USERSPACE
if ((count & 0x7f) == 0) delay(1 /* -TM- ms */);
if ((count & 0x7f) == 0) {
delay(1 /* -TM- ms */);
}
count++;
#endif /* USERSPACE */

Expand Down Expand Up @@ -353,8 +355,8 @@ bool processTerminal() {
if (seq[0] == 'F') {
uint32_t fontnum = textToWord(seq + 1);
if (fontnum >= 0) {
auto font = fonts[fontnum]; // get shared_ptr to font -- was fonts[bufferID]
if (font != nullptr && font->chptr == nullptr) { // check it's defined
auto font = fonts[fontnum]; // get shared_ptr to font -- was fonts[bufferID]
if (font != nullptr && font->chptr == nullptr) { // check it's defined
Terminal->loadFont(font.get());
}
}
Expand Down

0 comments on commit 1e5fa08

Please sign in to comment.