> 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
 00:06:08 up 7 days,  9:03,  1 user,  load average: 0.80, 0.93, 0.86
This commit is contained in:
tracer-ics2023
2024-09-25 00:06:11 +08:00
committed by zzy
parent aa2b8a8027
commit f5198b99fc

View File

@ -54,7 +54,6 @@ void NDL_OpenCanvas(int *w, int *h) {
int dev_w, dev_h, num;
char buf[32];
while (fgets(buf, sizeof(buf), fp)) {
printf("displayinfo %s\n", buf);
sscanf(buf, "%[^:]:%d", buf, &num);
if (strcmp(buf, "WIDTH") == 0) dev_w = num;
if (strcmp(buf, "HEIGHT") == 0) dev_h = num;
@ -63,6 +62,7 @@ void NDL_OpenCanvas(int *w, int *h) {
screen_w = (*w == 0 || *w > dev_w) ? dev_w : *w;
screen_h = (*h == 0 || *h > dev_h) ? dev_h : *h;
printf("w %d, h %d\n", screen_w, screen_h);
}
void NDL_DrawRect(uint32_t *pixels, int x, int y, int w, int h) {