Embedding SDL into GTK+

前端 未结 1 651
后悔当初
后悔当初 2021-01-06 12:16

I have an application that uses GTK+ to display some nice GUI, but I am using SDL to display a small RGB frame buffer inside GTK+

I have used the following code to g

相关标签:
1条回答
  • 2021-01-06 12:55

    Although I have not used SDL, but as you are looking for events it appears that you are running two event loops. Gtk runs its own event loop which handles events like the ones from mouse & keyboard. I think you need to find a way to integrate the both. Some googling resulted in the following link where in the section "Double event loop issue" your problem has been addressed (I think). Try adding SDLEvent function as idler function using g_idle_add as suggested in the link and see if it works.
    Hope this helps!

    0 讨论(0)
提交回复
热议问题