> compile NEMU

221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 13:46:30 up 7 days, 13:46,  1 user,  load average: 0.39, 0.26, 0.15
This commit is contained in:
tracer-ics2023
2024-09-25 13:46:30 +08:00
committed by zzy
parent 6de4e8748e
commit 4066ea6093

View File

@ -89,6 +89,7 @@ void NDL_DrawRect(uint32_t *pixels, int x, int y, int w, int h) {
int _x = (dev_w - x) / 2;
int _y = (dev_h - y) / 2;
for (int i = 0; i < h; i ++) {
printf("log:%d,%d, dev %d,%d, wh %d,%d, xy %d,%d\n", _x, _y + i, dev_w, dev_h, w, h, x, y);
fseek(fp, (dev_w * (_y + i) + _x) * sizeof(uint32_t), SEEK_SET);
fwrite(pixels + screen_w * (y + i) + x, sizeof(uint32_t), w, fp);
}