> 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
 11:03:31 up 7 days, 11:03,  1 user,  load average: 0.23, 0.16, 0.11
This commit is contained in:
tracer-ics2023
2024-09-25 11:03:31 +08:00
committed by zzy
parent ae5a4dc0fb
commit 500cfb7070

View File

@ -55,8 +55,8 @@ void NDL_OpenCanvas(int *w, int *h) {
char buf[64], name[32];
const char* pos = buf;
fread(buf, 1, sizeof(buf), fp);
printf("buf: %s", buf);
while (sscanf(pos, "%[^:]:%d\n", name, &num) == 2) {
printf("log: %s,%d\n", name, num);
pos = strchr(pos, '\n');
if (strcmp(name, "WIDTH") == 0) dev_w = num;
if (strcmp(name, "HEIGHT") == 0) dev_h = num;