From 8a1ca893f0a3f413f8d0562715496fffb213fcda Mon Sep 17 00:00:00 2001
From: Bernhard Schelling <14200249+schellingb@users.noreply.github.com>
Date: Sun, 3 Jan 2021 03:22:31 +0900
Subject: [PATCH] Fix winmm midi driver hanging on content closing

midiStreamStop can freeze the process when there has been a NOTE-ON message without a corresponding NOTE-OFF.
Just removing the call to midiStreamStop and letting the midiStreamClose below it do the entire stopping and closing fixes that.
---
 midi/drivers/winmm_midi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/midi/drivers/winmm_midi.c b/midi/drivers/winmm_midi.c
index 4268a9ceb7..2cec9187c0 100644
--- a/midi/drivers/winmm_midi.c
+++ b/midi/drivers/winmm_midi.c
@@ -17,7 +17,7 @@
 
 #include <libretro.h>
 #include <lists/string_list.h>
-#include <verbosity.h>
+#include "../../verbosity.h"
 #include <string/stdstring.h>
 
 #include "../midi_driver.h"
@@ -481,7 +481,6 @@ static void winmm_midi_free(void *p)
 
    if (d->out_dev)
    {
-      midiStreamStop(d->out_dev);
       winmm_midi_free_output_buffers(d->out_dev, d->out_bufs);
       midiStreamClose(d->out_dev);
    }