From 979945ae6bfdb891ca172c32f95df69c35775bdf Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Tue, 4 May 2004 10:27:41 +0000 Subject: [PATCH] move_overlay() fix for dualhead stretch/switch modes added. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7408 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../accelerants/nvidia/engine/nv_bes.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_bes.c b/src/add-ons/accelerants/nvidia/engine/nv_bes.c index 7ffe5f4c9a..04fc16dac4 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_bes.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_bes.c @@ -21,6 +21,25 @@ void nv_bes_move_overlay() /* abort if overlay is not active */ if (!si->overlay.active) return; + /* 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 ((si->overlay.ow.h_start + (si->overlay.ow.width / 2)) < + (si->dm.h_display_start + si->dm.timing.h_display)) + nv_bes_to_crtc(si->crtc_switch_mode); + else + nv_bes_to_crtc(!si->crtc_switch_mode); + break; + default: + nv_bes_to_crtc(si->crtc_switch_mode); + break; + } + } + /* the BES does not respect virtual_workspaces, but adheres to CRTC * constraints only */ crtc_hstart = si->dm.h_display_start;