"Negative" magic tool: play sound in fullscreen

Was only playing in paint mode.
This commit is contained in:
Bill Kendrick 2021-09-04 14:33:59 -07:00
parent 8d67915b3e
commit 82f1abb27f
2 changed files with 9 additions and 2 deletions

View file

@ -49,6 +49,11 @@ $Id$
* Greek * Greek
* Scottish Gaelic * 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) 2021.June.28 (0.9.26)
* New Features * New Features
------------ ------------

View file

@ -4,7 +4,7 @@
Negative Magic Tool Plugin Negative Magic Tool Plugin
Tux Paint - A simple drawing program for children. 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 bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: July 8, 2008 Last updated: September 4, 2021
$Id$ $Id$
*/ */
@ -195,6 +195,8 @@ void negative_click(magic_api * api, int which, int mode,
update_rect->y = 0; update_rect->y = 0;
update_rect->w = canvas->w; update_rect->w = canvas->w;
update_rect->h = canvas->h; update_rect->h = canvas->h;
api->playsound(negative_snd, (x * 255) / canvas->w, 255);
} }
} }