From 82f1abb27fb42295838e4c42c84d14a8e7612610 Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Sat, 4 Sep 2021 14:33:59 -0700 Subject: [PATCH] "Negative" magic tool: play sound in fullscreen Was only playing in paint mode. --- docs/CHANGES.txt | 5 +++++ magic/src/negative.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index a595b146f..ba1233447 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -49,6 +49,11 @@ $Id$ * Greek * Scottish Gaelic + * Bug Fixes: + ---------- + * "Negative" magic tool did not play its sound when using + fullscreen (vs painting) mode. Fixed. + 2021.June.28 (0.9.26) * New Features ------------ diff --git a/magic/src/negative.c b/magic/src/negative.c index 53479761f..45ff46558 100644 --- a/magic/src/negative.c +++ b/magic/src/negative.c @@ -4,7 +4,7 @@ Negative Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2021 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com http://www.tuxpaint.org/ @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: July 8, 2008 + Last updated: September 4, 2021 $Id$ */ @@ -195,6 +195,8 @@ void negative_click(magic_api * api, int which, int mode, update_rect->y = 0; update_rect->w = canvas->w; update_rect->h = canvas->h; + + api->playsound(negative_snd, (x * 255) / canvas->w, 255); } }