zeropolis79 / PETSCIIRobots-SDL

46 stars 15 forks source link

WSL1 fails #2

Open polluks opened 1 year ago

polluks commented 1 year ago

Starting program: petrobots
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffffc8d0700 (LWP 748)]
[Detaching after fork from child process 749]
[Detaching after fork from child process 750]
shared memfd open() failed: Function not implemented
[New Thread 0x7ffffb810700 (LWP 751)]
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM default
Failed to open audio device: ALSA: Couldn't open audio device: No such file or directory

Thread 1 "petrobots" received signal SIGSEGV, Segmentation fault.
PlatformSDL::displayImage (this=0x7ffffffedfa0, image=Platform::ImageIntro) at PlatformSDL.cpp:618
618         palette = imageSurfaces[image]->format->palette;
(gdb) p imageSurfaces
$1 = {0x0, 0x0, 0x0}
polluks commented 1 year ago

Workaround make setup && cd SDL;./petrobots

polluks commented 1 year ago

However I cannot move 2023-02-17 10_15_53-Attack of the PETSCII Robots

rilysh commented 1 year ago

SDL does have native support for Windows. Try to compile there. It sounds like a limitation with WSL2 as on Linux, I don't see any problem.

polluks commented 1 year ago

I found a reason, SDL_TEXTINPUT instead of SDL_KEYDOWN https://stackoverflow.com/questions/26664139/sdl-keydown-and-key-recognition-not-working-properly libsdl2-dev/oldoldstable,now 2.0.9+dfsg1-1+deb10u1 amd64 [installed]