SDL_PollEvent will return 0 if there are no events, so in this case it will enter the while loop and stay there until an event is recieved.

This is correct behaviour for the FE_WaitEvent was what you are asking is for the app to wait for an event before continuing.

If you are running your rendering and input on the main app thread then you should FE_PollEvent or SDL_PollEvent. Here is an example

[pascal]
while not Done do
begin

while SDL_PollEvent(@event) > 0 do
begin
if event.type_ = SDL_QUITEV then Done := True;
end;
// Render stuff
SDL_Flip(screen);
end;
[/pascal]

This will poll the event system and return if not events are present. If I remember correctly Fast Events has a FE_PollEvent which you can plug in there.