> 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 18:24:56 up 7 days, 18:25, 1 user, load average: 0.69, 0.36, 0.22
This commit is contained in:
@ -38,7 +38,7 @@ size_t dispinfo_read(void *buf, size_t offset, size_t len) {
|
||||
size_t fb_write(const void *buf, size_t offset, size_t len) {
|
||||
int w = io_read(AM_GPU_CONFIG).width;
|
||||
offset /= sizeof(uint32_t);
|
||||
TRACE("fb_write: offset=%d len=%d\n", offset, len);
|
||||
// TRACE("fb_write: offset=%d len=%d\n", offset, len);
|
||||
io_write(AM_GPU_FBDRAW, offset % w, offset / w, (void*)buf, len / sizeof(uint32_t), 1, true);
|
||||
return len;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ void NDL_DrawRect(uint32_t *pixels, int x, int y, int w, int h) {
|
||||
int _x = (dev_w - w) / 2;
|
||||
int _y = (dev_h - h) / 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);
|
||||
// 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) * 4, SEEK_SET);
|
||||
fwrite(pixels + screen_w * (y + i) + x, 4, w, fp);
|
||||
}
|
||||
|
Reference in New Issue
Block a user