![]() |
mouse grab - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3) +--- Forum: Bugs (https://www.vdrift.net/Forum/forumdisplay.php?fid=7) +--- Thread: mouse grab (/showthread.php?tid=1018) |
mouse grab - alex25 - 11-14-2008 quite a few times now i've had vdrift crash and then the mouse was just stuck and i couldn't use it any more (this is on linux). i assume vdrift grabbed the mouse and when it crashed it never released it. this is really annoying as i had to re-start the x-server to get the mouse working again. on a completely different note, it would be nice if the screen shot functionality were to work again. --alex-- - thelusiv - 11-14-2008 This was driving me crazy too and I bugged Joe about it, so he added this to the config file: Code: [ control ]... PS: omg I'm back! Sadly VDrift post-refactor is not working very well on 64-bit systems, so I won't be doing much. I'm still pretty busy with other stuff too. ![]() ![]() - alex25 - 11-14-2008 thelusiv Wrote:This was driving me crazy too and I bugged Joe about it, so he added this to the config file: thanks, that kind of works but what i would like is for vdrift to grab the mouse when running (so i don't end up with the mouse outside the vdrift window) but when it crashes with an exception to actually release the grab (i've been looking at the code but i can't figure out where it grabs the mouse in the first place). btw, i am also running on a 64-bit machine and the refactor branch seems to work okay (i don't have a 32-bit machine any more so i can't tell what the differences are). --alex-- - joevenzon - 11-16-2008 alex25 Wrote:what i would like is for vdrift to grab the mouse when running (so i don't end up with the mouse outside the vdrift window) but when it crashes with an exception to actually release the grab That'd be great, but I haven't been able to figure it out so far. Let me know if you're able to get it working. alex25 Wrote:i've been looking at the code but i can't figure out where it grabs the mouse in the first place It happens in EVENTSYSTEM_SDL::SetMouseCursorVisibility(). Re: mouse grab - joevenzon - 11-16-2008 alex25 Wrote:it would be nice if the screen shot functionality were to work again. I've got it in the issue tracker thing here: http://code.google.com/p/vdrift/issues/detail?id=91 I think there's a way to star the item so you'll get an e-mail when there's progress. I'll see if I can get it fixed pretty soon. - alex25 - 11-16-2008 joevenzon Wrote:alex25 Wrote:what i would like is for vdrift to grab the mouse when running (so i don't end up with the mouse outside the vdrift window) but when it crashes with an exception to actually release the grab this is a quick and dirty hack, but it works for me. basically i am adding a signal handler so when abort is called vdrift releases the mouse first before crashing: Code: --- game.cpp (revision 2219) there must be a better way of doing this, this is just a proof of concept. actually this code should go in main if implemented in this form. --alex-- - alex25 - 11-16-2008 alex25 Wrote:actually this code should go in main if implemented in this form. something like this: Code: --- main.cpp (revision 2219) ignore the part about fpe exceptions, i guess (and the debug statement). --alex-- - joevenzon - 11-16-2008 Cool! I take it this is linux only? I wonder if it'll work on OSX. By the way, screenshots should be working again in R2220. - alex25 - 11-16-2008 joevenzon Wrote:Cool! I take it this is linux only? I wonder if it'll work on OSX. signal handlers should work on bsd as well but i guess somebody needs to check it out. --alex-- - joevenzon - 11-16-2008 Okay, this code is in R2222. I had to add .h to the includes for them to be picked up on my system. |