04-17-2022, 09:22 AM
(04-15-2022, 07:21 PM)scott_VYuCAbn3k1NFK Wrote:(04-15-2022, 06:42 PM)mi Wrote: In regards to the issue with `echo -e` not working under dash shell; thanks for flagging this. I've updated scripts to use printf which is more portable. Also I'm now shellchecking all bundled scripts which should help with cross-platform issues for the next release and releases going forward. (Indeed using bash instead of sh would be a workaround in the meantime)
About the wayland SDL video driver not working under mobian, that's not good to hear. I've largely tested under Alpine/pmOS and have also had reports in NixOS and Arch of wayland video driver in mepo working a-ok there. So I'd be curious if you could provide any more detailed information about wayland driver not working. If you could post a log of running `mepo -e` that would be useful for debugging.
I think I know what the issue is anyway - main.zig line 46 was changed from `mepo.sdl_event_loop()` to ` mepo.event_loop_and_read_stdin()`. Changing just that line back shows the window again.
Speculation:
The change moves a bunch of SDL code into a thread. In particular SDL_PumpEvents can only be called in the thread that initialized the video system (https://wiki.libsdl.org/SDL_PumpEvents). HTH and is somewhere near correct!
Ok so I was able to replicate this issue with the window not appearing & indeed the way things were setup with SDL video initialization code vs main loop code being in different threads was the root cause of this issue. This issue only affected the wayland driver. Your investigation on this is very much appreciated.
Have pushed a change in the git repository tip so this issue should be resolved (!) as now all SDL video code gets run from the same thread.
Ofcourse tagged versions (e.g. latest 0.4) will be in general more stable then bleeding edge. Regression testing happens before tagged releases but ofcourse help testing on git latest commit vs tagged versions is appreciated too. With the latest changes on git the reason for moving this stuff into a thread is that also mepo now reads from STDIN from console and can be used interactively to debug mepolang configuration/code this way.