[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[631] trunk/fuse/fusepb/views/DisplayOpenGLVi
Brought to you by:
fredm
From: <fr...@us...> - 2009-12-11 11:11:21
|
Revision: 631 http://fuse-for-macosx.svn.sourceforge.net/fuse-for-macosx/?rev=631&view=rev Author: fredm Date: 2009-12-11 11:11:15 +0000 (Fri, 11 Dec 2009) Log Message: ----------- Attempt to resolve the "hang-on-double-click-file" issue. Modified Paths: -------------- trunk/fuse/fusepb/views/DisplayOpenGLView.m Modified: trunk/fuse/fusepb/views/DisplayOpenGLView.m =================================================================== --- trunk/fuse/fusepb/views/DisplayOpenGLView.m 2009-12-08 12:21:05 UTC (rev 630) +++ trunk/fuse/fusepb/views/DisplayOpenGLView.m 2009-12-11 11:11:15 UTC (rev 631) @@ -1276,8 +1276,15 @@ { int i; PIG_dirtytable *workdirty = NULL; - - [buffered_screen_lock lock]; + + // Is it possible that while waiting for a lock the emulator is stopped? + // or already holds the lock? If so give up on updating the frame rather + // than deadlock on getting the lock - may mean that we miss some screen + // updates if we are invoked while the buffered screen is being updated + if( !buffered_screen_lock || [buffered_screen_lock tryLock] == NO ) { + return kCVReturnSuccess; + } + if( buffered_screen.dirty->count == 0 && !statusbar_updated ) { [buffered_screen_lock unlock]; return kCVReturnSuccess; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |