Open oh-facts opened 4 hours ago
I did some more work. So, this works fine with SDL2.
I don't think static linking is the issue here, since I used the same config for the sdl2 version (msvc, debug mode, static crt, static lib, C++).
I think it has to do something with that commit.
Can you reproduce it with an SDL test program? Most of them have that kind of loop structure.
My game was working fine before. Then I updated my sdl and I noticed that my game was stuck in an infinite loop. Upon further investigation I found that control was stuck inside my event loop and it wouldn't break out because of a sentinel event.
I haven't needed to break out explicitly before using the poll sentinel event. Also, I checked and the sentinel event is internal and ideally I shouldn't need to interact with it at all.
I made no changes to my code either, I just updated SDL.
The SDL3 commit is 638b50b69be6dd158e89d462dc786c067fc9e7ba. Also, SDL3 is built as a static library and the CRT is linked statically and this is debug mode. I compiled using the msvc compiler. This is C++.
PS: I explored a little more and I am quite confused now.
Control is in the return false bit.
So, the event is a sentinel event, and false should be returned, right?
Here, is the part I don't get it.
Why is
res = 1
? It clearly returned false right?Let me know if I should provide more information.
Thank you.