> 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
 20:16:09 up 7 days, 20:16,  1 user,  load average: 0.23, 0.25, 0.22
This commit is contained in:
tracer-ics2023
2024-09-25 20:16:09 +08:00
committed by zzy
parent 084f4fcd41
commit 0f795cd5ad

View File

@ -54,23 +54,23 @@ static void _get_screen(int *w, int *h) {
} }
void NDL_OpenCanvas(int *w, int *h) { void NDL_OpenCanvas(int *w, int *h) {
// if (getenv("NWM_APP")) { if (getenv("NWM_APP")) {
// int fbctl = 4; int fbctl = 4;
// fbdev = 5; fbdev = 5;
// screen_w = *w; screen_h = *h; screen_w = *w; screen_h = *h;
// char buf[64]; char buf[64];
// int len = sprintf(buf, "%d %d", screen_w, screen_h); int len = sprintf(buf, "%d %d", screen_w, screen_h);
// // let NWM resize the window and create the frame buffer // let NWM resize the window and create the frame buffer
// write(fbctl, buf, len); write(fbctl, buf, len);
// while (1) { while (1) {
// // 3 = evtdev // 3 = evtdev
// int nread = read(3, buf, sizeof(buf) - 1); int nread = read(3, buf, sizeof(buf) - 1);
// if (nread <= 0) continue; if (nread <= 0) continue;
// buf[nread] = '\0'; buf[nread] = '\0';
// if (strcmp(buf, "mmap ok") == 0) break; if (strcmp(buf, "mmap ok") == 0) break;
// } }
// close(fbctl); close(fbctl);
// } }
int dev_w, dev_h; int dev_w, dev_h;
_get_screen(&dev_w, &dev_h); _get_screen(&dev_w, &dev_h);