summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2017-02-19 20:42:36 +0100
committerHein-Pieter van Braam <hp@tmm.cx>2017-02-19 20:45:17 +0100
commit04e51859f0b765207f5c19d7c1043b86aa776931 (patch)
tree768b590aaa3863a8ceedaab22748544137b44b1e /platform/windows
parent5e3fc7d06956dcda8b50cd4f028c83cf967f7223 (diff)
Windows: Close audiodriver sooner on exit
In #7839 I see the same error that was fixed in #7833 occuring on the Windows platform. This moves the audio driver closing to the same place in OS_Windows::finalize() as it is in OS_X11::finalize() This fixes #7839
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/os_windows.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 1e51c18b63..6101387c7f 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1255,6 +1255,10 @@ void OS_Windows::finalize() {
main_loop=NULL;
+ for (int i = 0; i < get_audio_driver_count(); i++) {
+ AudioDriverManager::get_driver(i)->finish();
+ }
+
memdelete(joypad);
memdelete(input);
@@ -1282,13 +1286,8 @@ void OS_Windows::finalize() {
memdelete(physics_2d_server);
monitor_info.clear();
-
- for (int i = 0; i < get_audio_driver_count(); i++)
- {
- AudioDriverManager::get_driver(i)->finish();
- }
-
}
+
void OS_Windows::finalize_core() {
memdelete(process_map);