From nobody Tue Nov 5 06:40:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1641656769; cv=none; d=zohomail.com; s=zohoarc; b=UIMfAxhllC6suI7FudMduR01d0WjPy7g1r6ZnHu4Jdyz2/8R7IrWfO2QYnS5SGCEQJ8vP5Qp6XH/DWIJd9h/81r4nyQbIHJ9vTUbM6Yw3ZhMTIdRENyxou314OAIDNVzq00cvw1F/5tqEzfDWcEBe0AOWx1FBUIKyxbUezBh0Fg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641656769; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pyjnlbM1xVRCEuPnUEKS3/v5vZFiQrHwvnK44ISZw2w=; b=kUuE8+n/p6qT56LrOaYQ+0dlOZRki1foBe48oB9goWG/eGfEIJiS5TW2XlV9Iggz5SAeRkZMvjU21bykHPl1WO2wJHIFlXbImUDxzl3HiGz4aUgxz10w9Ip5/kDCaM5a/K149TjPGjqB98cHFrA0S/r/r1DrAz8I5Ugzo1rnMqY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1641656769186847.4573501984992; Sat, 8 Jan 2022 07:46:09 -0800 (PST) Received: from localhost ([::1]:59332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6Duy-0001D6-74 for importer@patchew.org; Sat, 08 Jan 2022 10:46:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6Dov-0006h8-Gx for qemu-devel@nongnu.org; Sat, 08 Jan 2022 10:39:53 -0500 Received: from [2a00:1450:4864:20::52c] (port=38596 helo=mail-ed1-x52c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6Dou-0006oc-46 for qemu-devel@nongnu.org; Sat, 08 Jan 2022 10:39:53 -0500 Received: by mail-ed1-x52c.google.com with SMTP id u21so11851920edd.5 for ; Sat, 08 Jan 2022 07:39:51 -0800 (PST) Received: from localhost.localdomain ([2a02:a467:f77d:1:78f2:78aa:23a7:b824]) by smtp.gmail.com with ESMTPSA id 24sm599840ejg.47.2022.01.08.07.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jan 2022 07:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=pyjnlbM1xVRCEuPnUEKS3/v5vZFiQrHwvnK44ISZw2w=; b=c61oQodSBo2v9e4fuy7sJm42RbMNjVFgz7NJ9kzScOxzK1FAggIQzQSmWFkJzBIyoZ JCYwifvy7wNZzjaYyA1kyrm4KPrMBCUGpHxgf3sqWDIqOkuKVmr1Znl7+ihScZM4FiVh QFGBPHJf6IpV5WPnLFT0w82tx0OSHeFdb6Jqa/vHwEKoPFVpHCGrN1YR0m7FTmv0Fy3g zYyBfoXFSgGszWrDWR3k6zD/t5VehVT4VRrwzuqv+BrYtKWdMKaltIbosDHAxKIzyxYe vVLxwGYX08mGBIcV6ztvAXiG9/v1ai6TOiJvavnBHVyir8lOrus+pHGArp4ML5lYWy5m 4ClA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pyjnlbM1xVRCEuPnUEKS3/v5vZFiQrHwvnK44ISZw2w=; b=qKxUEIpNn4i1SPVFwDWM8H9Wy5fRxK8MLLgKnRwEbNtF17dV8DAYRO7bBih5vQhO/u KL8uCV9qSDtyAy/dscArl/eCx4cRKrOQmujPqr0B/DBUYoSsgOclV/XMbG0awb5xZuc9 I1+pYLl3yAv7BmXsVWQ2x+Q0/O3M7ZfiSkhySKPouR4/O3ye8eULrC91k1d3p+yTktuP e9DLKuV1q/iv1berstA0ArS85t4DneuDBZZ3QsJ2BGRXAEUXhz+x/voo/J8jTTmDfXgs V8gGc2vgvEMKIJBFlwxDzXninM83WYLjDa1+g+Xv3tBiiZEkCGG1R9yY/BRLEBFNIFQ/ 6kVg== X-Gm-Message-State: AOAM533rzK7oCRL1WO+FT3yjGWXmrVL5BJ2qUAVMak1AHbySlar1CjsT N3p+cGzSJSPEWBGvzqBwFuXX17DxpY4= X-Google-Smtp-Source: ABdhPJzaHf2JO8jOX5X+TMhUhPtpQPQ1pgIilTHwXJ17XfrlxhYkdjhaXtoVWbk2kC30x5CGy+pg0Q== X-Received: by 2002:a17:906:9742:: with SMTP id o2mr12179962ejy.530.1641656390540; Sat, 08 Jan 2022 07:39:50 -0800 (PST) From: Dmitry Petrov To: qemu-devel@nongnu.org, dpetroff@gmail.com Subject: [PATCH v4 4/5] ui/sdl2: pass horizontal scroll information to the device code Date: Sat, 8 Jan 2022 16:39:46 +0100 Message-Id: <20220108153947.171861-5-dpetroff@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220108153947.171861-1-dpetroff@gmail.com> References: <20220108153947.171861-1-dpetroff@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52c (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=dpetroff@gmail.com; helo=mail-ed1-x52c.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1641656771270100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Dmitry Petrov --- ui/sdl2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 0bd30504cf..46a252d7d9 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -33,6 +33,7 @@ #include "sysemu/runstate-action.h" #include "sysemu/sysemu.h" #include "ui/win32-kbd-hook.h" +#include "qemu/log.h" =20 static int sdl2_num_outputs; static struct sdl2_console *sdl2_console; @@ -535,6 +536,10 @@ static void handle_mousewheel(SDL_Event *ev) btn =3D INPUT_BUTTON_WHEEL_UP; } else if (wev->y < 0) { btn =3D INPUT_BUTTON_WHEEL_DOWN; + } else if (wev->x < 0) { + btn =3D INPUT_BUTTON_WHEEL_RIGHT; + } else if (wev->x > 0) { + btn =3D INPUT_BUTTON_WHEEL_LEFT; } else { return; } --=20 2.32.0