|
From: <sag...@us...> - 2011-07-16 22:43:08
|
Revision: 919
http://modplug.svn.sourceforge.net/modplug/?rev=919&view=rev
Author: saga-games
Date: 2011-07-16 22:43:01 +0000 (Sat, 16 Jul 2011)
Log Message:
-----------
[Mod] If opening MIDI In fails, the config dialog is shown.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mpt_midi.cpp
Modified: trunk/OpenMPT/mptrack/Mpt_midi.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mpt_midi.cpp 2011-07-16 20:29:21 UTC (rev 918)
+++ trunk/OpenMPT/mptrack/Mpt_midi.cpp 2011-07-16 22:43:01 UTC (rev 919)
@@ -5,6 +5,7 @@
#include "moddoc.h"
#include "dlsbank.h"
#include "midi.h"
+#include "Moptions.h" // for OPTIONS_PAGE_MIDI
//#define MPTMIDI_RECORDLOG
@@ -122,6 +123,11 @@
if (midiInOpen(&shMidiIn, m_nMidiDevice, (DWORD)MidiInCallBack, 0, CALLBACK_FUNCTION) != MMSYSERR_NOERROR)
{
shMidiIn = NULL;
+
+ // Show MIDI configuration on fail.
+ CMainFrame::m_nLastOptionsPage = OPTIONS_PAGE_MIDI;
+ CMainFrame::GetMainFrame()->OnViewOptions();
+
return FALSE;
}
midiInStart(shMidiIn);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|