Keyboard and mouse - event handling problem. |
bigov
|
I'm sorry, I want to clarify the fragment of my code:
|
|||||||||||||
|
Naith
|
Change your if(SDL_PollEvent(&ev)) into while(SDL_PollEvent(&ev)) and check if it works after that. If not, let me know and I will try to help you further.
|
|||||||||||
|
bigov
|
With this code the problem persists:
To solve the problem I deside to use SDL_PumpEvents() function:
But I doubt in choosing the method of the checking window events (resize, quit) in this case. It is better to choose function for the checking window events? Can you help me to select? |
|||||||||||||||
|
Naith
|
Sorry it didn't help.
To be able to help you further, I'm afraid I'll need to see the rest of your code, especially the one that's handling the keyboard and mouse inputs (i.e the function that handles all the 'actions'). Do you have your code in github, dropbox or similar? |
|||||||||||
|
bigov
|
Thank you for your time. For myself, I already solved the issue. Do you have a relationship to SDL2 developers? If it is necessary, I can prepare a small sample application and place the code in an open place to understand and fix the issue in the topic. |
|||||||||||||
|
Naith
|
No, no relation with the SDL2 developers. Out of curiosity, was the issue caused by something in your own code or in the SDL2 library code?
|
|||||||||||
|
bigov
|
I am sure that the reason is that since a library. Handling events from the mouse for some strange reason, have priority in the SDL. |
|||||||||||||
|