Collecting Input using SDL_CreateWindowFrom |
Mako_energy
|
I posted about this issue not long ago in another thread, here. Got no response, so here goes with a new thread.
In short I'm trying to change the way Ogre and SDL are bound to each other in my project by using the SDL_CreateWindowFrom() function. When I try this, I get zero input events. As if nothing is happening. I've verified my main loop and event manager are working fine, just not getting any events from SDL. I thought maybe since SDL doesn't "own" the window made by this function it turns off input grab for the window by default, so it doesn't try to step on the toes of something else that may be doing the same(got the idea from a post on these forums). So I tried to enable input grab for the window and there is still no input events being generated. I'm pretty sure others have attempted this and succeeded, and I'm sure I'm missing something simple. If anyone can help me out I'd greatly appreciate it. |
|||||||||||
|
Collecting Input using SDL_CreateWindowFrom |
pulkomandy
Guest
|
Last time I did embed SDL in something else, I had to use SDL_PushEvent with event I created myself from an event handler in wxWidgets. Likely you're not trying to embed SDL into a wxWidgets window, and that was with SDL1.2 ; but it may be worth trying something similar. Not sure if there are other solutions, I remember SDL as being quite invasive when you try to mix it with other stuff. -- Adrien. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Collecting Input using SDL_CreateWindowFrom |
Ryan C. Gordon
Guest
|
We override the window's original event handler (and then call it after we've run our own). Can you set a breakpoint on WIN_WindowProc(), in SDL/src/video/windows/SDL_windowsevents.c ? If this function isn't being called, then we never got control of the window's event handler. ALSO: if it _is_ getting called, but that GetProp() call near the start fails, that would cause the behaviour you're seeing. Since the matching SetProp() seemed to be failing for you in the other thread, I imagine this will be the actual culprit. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Collecting Input using SDL_CreateWindowFrom |
Ryan C. Gordon
Guest
|
Are you at a point where you can send me the binaries (your .exe, .dll files, data, etc), so I can run it here? --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Re: Collecting Input using SDL_CreateWindowFrom |
Mako_energy
|
We currently have two apps made, our game requires some art assets that I can't release at this point unfortunately. However we have a test bed application as well that we use to test features and that I can share/send. The behavior is identical in both applications(in relation to this issue). I can either email you all the relevant files(just give me an email to send it to), or if you want complete overkill you can grab a copy of our repo and you can compile it yourself. Edit: I had to revert the code in the repo cause others needed it working for their tests and updates. |
|||||||||||||
|