| 813 | } |
| 814 | #else |
| 815 | static void |
| 816 | back_buffer_flip(void) |
| 817 | { |
| 818 | cell_t *back = console.back_buffer; |
| 819 | cell_t *front = console.front_buffer; |
| 820 | COORD pos; |
| 821 | DWORD unused; |
| 822 | |
| 823 | if (!console.is_ready) |
| 824 | return; |
| 825 | |
| 826 | for (pos.Y = 0; pos.Y < console.height; pos.Y++) { |
| 827 | for (pos.X = 0; pos.X < console.width; pos.X++) { |
| 828 | if (back->attribute != front->attribute) { |
| 829 | WriteConsoleOutputAttribute(console.hConOut, &back->attribute, |
| 830 | 1, pos, &unused); |
| 831 | front->attribute = back->attribute; |
| 832 | } |
| 833 | if (back->character != front->character) { |
| 834 | if (console.has_unicode) { |
| 835 | WriteConsoleOutputCharacterW( |
| 836 | console.hConOut, &back->character, 1, pos, &unused); |
| 837 | } else { |
| 838 | char ch = (char) back->character; |
| 839 | WriteConsoleOutputCharacterA(console.hConOut, &ch, 1, pos, |
| 840 | &unused); |
| 841 | } |
| 842 | *front = *back; |
| 843 | } |
| 844 | back++; |
| 845 | front++; |
| 846 | } |
| 847 | } |
| 848 | } |
| 849 | #endif |
| 850 | |
| 851 | void buffer_fill_to_end(cell_t * buffer, cell_t * fill, int x, int y) |
no outgoing calls
no test coverage detected