| 540 | |
| 541 | #ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS |
| 542 | static void Window__flipBitmap(uint8_t* pixels, const int width, const int height, const int depth) { |
| 543 | for (int y = 0; y < height / 2; y++) { |
| 544 | const int flipY = height - y - 1; |
| 545 | uint8_t tmp[width * depth]; |
| 546 | std::memcpy(tmp, &pixels[y * width * depth], width * depth); |
| 547 | std::memmove(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth); |
| 548 | std::memcpy(&pixels[flipY * width * depth], tmp, width * depth); |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | |
| 553 | #ifdef STBI_WRITE_NO_STDIO |