Hi Sam ad folks,
Currently I’m writing a new FreeBSD-specific SDL driver (almost complete,
expect patches soon) and have the following small questions:
-
Is it safe to call SDL_PrivateMouse{Button, Motion} finctions from within a
signal handler (FreeBSD provides a possibility to notify about mouse events via
signal delivery). Currently, when I’m setting up it this way almost any SDL
program locks up if I’m actively moving mouse.
-
Is it necessary to have a surface locking functions if the only surface
available is the main video buffer (for example fbcon video driver has this
feature, while svgalib doesn’t)?
Thanks!
-Maxim
- Is it safe to call SDL_PrivateMouse{Button, Motion} finctions from within a
signal handler (FreeBSD provides a possibility to notify about mouse events via
signal delivery). Currently, when I’m setting up it this way almost any SDL
program locks up if I’m actively moving mouse.
you can’t do much inside a signal handler — read Stevens for a more
precise description of what you can and cannot do. In particular, you can’t
safely call any SDL functions
- Is it necessary to have a surface locking functions if the only surface
available is the main video buffer (for example fbcon video driver has this
feature, while svgalib doesn’t)?
depends on whether your video surface need locking. For example, DGA needs
locking since it has to ensure that the previous flip has taken place
Mattias Engdeg?rd wrote:
- Is it safe to call SDL_PrivateMouse{Button, Motion} finctions from within a
signal handler (FreeBSD provides a possibility to notify about mouse events via
signal delivery). Currently, when I’m setting up it this way almost any SDL
program locks up if I’m actively moving mouse.
you can’t do much inside a signal handler — read Stevens for a more
precise description of what you can and cannot do. In particular, you can’t
safely call any SDL functions
- Is it necessary to have a surface locking functions if the only surface
available is the main video buffer (for example fbcon video driver has this
feature, while svgalib doesn’t)?
depends on whether your video surface need locking. For example, DGA needs
locking since it has to ensure that the previous flip has taken place
Thank you for the answers!
-Maxim