[SDL] Re: Loosing control of SDL window

Patrik Opacic opacic at swipnet.se
Tue Nov 25 13:29:02 PST 2003


On Sun, 23 Nov 2003 21:52:23 +0100, Patrik Opacic <opacic at swipnet.se> 
wrote:

>> Hello
>>
>> I'm having a problem with using SDL in windowed mode in windows. The 
>> problem comes at random when minimizing, maximizing and/or iconifying 
>> the window. What happens is that my program stop recieving events 
>> although the window is active. I can resize the window, but no resize 
>> event is sent, which causes problems as I can't update the renderer with 
>> the new window dimensions. Is this SDL not handling windows events 
>> properly? Or am I doing something wrong?
>>
>
> I tried debugging and it looks like the program is caught in an endless 
> loop in dinput.dll. Anyone have any idea why this is happening?
>

I've managed to solve the problem. What I did was calling SDL_Init(0) 
assuming the event handling subsystems would be initialized. However it 
was'nt so I have to call SDL_Init() with SDL_INITVIDEO. This is not a good 
solution for me because the video subsystem might not be used at all. So my 
question now is if there is a way to initialize event handling without 
initializing the video subsystem. Perhaps by calling internal SDL 
functions? Can it be done in a way so that it does'nt create problems when 
later calling SDL_InitSubSystem(SDL_INITVIDEO)?





More information about the SDL mailing list