hrydgard/ppsspp — pull request #2382 by unknownbrackets (2013-06-21 06:15:44+00:00)
Title: Make sure Windows shuts down its audio properly.

`~EmuScreen()` can call `PSP_Shutdown()`, which calls `host->ShutdownSound()`.

Because of this, we really need `host` to be a `WindowsHost` during `NativeShutdownGraphics()`. This fixes crashes when the dsound thread tries to access things that are being destructed by the CRT, like mutexes.

-[Unknown]