1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-12-27 21:40:11 +01:00

Merge pull request #5 from GeorgeMcMullen/midifix

Fix to the routine that opens the MIDI file.
This commit is contained in:
Muzychenko Andrey 2021-08-18 10:08:55 +03:00 committed by GitHub
commit dcd488c48c
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,9 +54,9 @@ int midi::music_init(HWND hwnd)
mci_open_info.wDeviceID = 0;
midi_notify_hwnd = hwnd;
lstrcpyA(midi_device_type, pinball::get_rc_string(156, 0));
mci_open_info.lpstrElementName = nullptr;
mci_open_info.lpstrDeviceType = midi_device_type;
auto result = mciSendCommandA(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_NOTIFY_SUPERSEDED, (DWORD_PTR)&mci_open_info);
mci_open_info.lpstrElementName = midi_device_type;
mci_open_info.lpstrDeviceType = nullptr;
auto result = mciSendCommandA(0, MCI_OPEN, MCI_OPEN_ELEMENT | MCI_NOTIFY_SUPERSEDED, (DWORD_PTR)&mci_open_info);
midi_seq1_open = result == 0;
return midi_seq1_open;
}