Based on a patch by Zebediah Figura. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46270 Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>