NJU-ProjectN / nemu

NJU EMUlator, a full system x86/mips32/riscv32/riscv64 emulator for teaching
Other
858 stars 184 forks source link

Fix weird sdl behavior under wayland environment. #70

Closed mushsoooup closed 1 year ago

mushsoooup commented 1 year ago

While working on PA2 keyboard section, I noticed that with SDL_VIDEODRIVER=wayland, the SDL window won't pop out when running am-test mainargs=k, making it impossible to continue. As stated here: SDL docs, wayland requires that the application initially present a buffer before the window becomes visible. So simply render right after the window is created would do.