> 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
 10:48:45 up 7 days, 10:49,  1 user,  load average: 0.15, 0.13, 0.14
This commit is contained in:
tracer-ics2023
2024-09-25 10:48:45 +08:00
committed by zzy
parent e0e2eef721
commit e208cc630d

View File

@ -52,8 +52,9 @@ void NDL_OpenCanvas(int *w, int *h) {
}
int dev_w, dev_h, num;
char buf[32];
char buf[64];
while (fgets(buf, sizeof(buf), fp)) {
printf("log : %s", buf);
sscanf(buf, "%[^:]:%d", buf, &num);
if (strcmp(buf, "WIDTH") == 0) dev_w = num;
if (strcmp(buf, "HEIGHT") == 0) dev_h = num;