From eda068521a7df4c39dadc0309d80b6b2d735ec88 Mon Sep 17 00:00:00 2001 From: Jean Guyader Date: Wed, 3 Dec 2008 17:58:38 +0000 Subject: [PATCH] Handle multiple call to intel_focus with the same arguement. --- intel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/intel.c b/intel.c index 8d8deede..b77aa423 100644 --- a/intel.c +++ b/intel.c @@ -287,7 +287,9 @@ static void unset_data_mappings(void) void intel_focus(int focus) { - intel_have_focus = focus; + if (intel_have_focus == focus) + return; + if (focus) { if (!is_linear()) { if (intel_get_reg(REG_DR_DSPASTRIDE) == 0x1000) { @@ -305,6 +307,7 @@ void intel_focus(int focus) } else if (old_data) { unset_data_mappings(); } + intel_have_focus = focus; } static void intel_parse_arg(const char *arg) -- 2.39.5