rem: if ((ow->h_start + (ow->width / 2)) < (si->dm.virtual_width / 2))
add: if ((ow->h_start + (ow->width / 2)) < (si->dm.h_display_start + si->dm.timing.h_display))
context: status_t CONFIGURE_OVERLAY	(overlay_token ot, const overlay_buffer *ob, const overlay_window *ow, const overlay_view *ov){	int offset = 0; /* used for buffer index */	LOG(4,("Overlay: Configure_overlay called: "));	/* Note:	 * When a Workspace switch, screen prefs change, or overlay app shutdown occurs, BeOS will	 * release all overlay buffers. The buffer currently displayed at that moment, may need some	 * 'hardware releasing' in the CONFIGURE_OVERLAY routine. This is why CONFIGURE_OVERLAY gets	 * called one more time then, with a null pointer for overlay_window and overlay_view, while	 * the currently displayed overlay_buffer is given.	 * The G200-G550 do not need to do anything on such an occasion, so we simply return if we	 * get called then. */	if ((ow == NULL) || (ov == NULL))	{		LOG(4,("output properties changed\n"));		return B_OK;	}		/* Note:	 * If during overlay use the screen prefs are changed, or the workspace has changed, it	 * may be that we were not able to re-allocate the requested overlay buffers (or only partly)	 * due to lack of cardRAM. If the app does not respond properly to this, we might end up 	 * with a NULL pointer instead of a overlay_buffer to work with here. 	 * Of course, we need to abort then to prevent the system from 'going down'.	 * The app will probably crash because it will want to write into this non-existant buffer	 * at some point. */	if (ob == NULL)	{		LOG(4,("no overlay buffer specified\n"));		return B_ERROR;	}		/* is this call done by the app that owns us? */	if ((ot == NULL) || (si->overlay.myToken == NULL) || (ot != si->overlay.myToken))	/* nope, abort */	{		LOG(4,("failed\n"));		return B_ERROR;	}	else	/* call is for real */	{		/* find the buffer's offset */		for (offset = 0; offset < MAXBUFFERS; offset++)		{			if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;		}		if (offset < MAXBUFFERS)		{			LOG(4,("succesfull, switching to buffer %d\n", offset));			/* do 'overlay follow head' in dualhead modes on dualhead cards */			if (si->ps.secondary_head)			{				switch (si->dm.flags & DUALHEAD_BITS)				{				case DUALHEAD_ON:				case DUALHEAD_SWITCH:					if ((ow->h_start + (ow->width / 2)) < (si->dm.virtual_width / 2))						nv_bes_to_crtc(0);					else						nv_bes_to_crtc(1);					break;				default:						nv_bes_to_crtc(0);					break;				}			}			/* _now_ program overlay hardware */			nv_configure_bes(ob, ow, ov, offset);			return B_OK;		}		else		{			/* this is no buffer of ours! */			LOG(4,("buffer is not ours, aborted!\n"));			return B_ERROR;		}	}}