|
From: <pst...@us...> - 2010-07-17 16:13:30
|
Revision: 799
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=799&view=rev
Author: pstieber
Date: 2010-07-17 16:13:22 +0000 (Sat, 17 Jul 2010)
Log Message:
-----------
1. Used MAXERRORLENGTH for error message size instead of a hard-coded 200.
2. Wrapped a line longer than 80 columns.
3. Changed some message box formatting.
Modified Paths:
--------------
trunk/jazz/src/mswin/WindowsPlayer.cpp
Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp
===================================================================
--- trunk/jazz/src/mswin/WindowsPlayer.cpp 2010-07-17 15:29:31 UTC (rev 798)
+++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2010-07-17 16:13:22 UTC (rev 799)
@@ -114,9 +114,9 @@
}
if (rc)
{
- char errtxt[200];
- midiInGetErrorText(rc, (LPSTR)errtxt, sizeof(errtxt));
- wxMessageBox(errtxt, "open midi input", wxOK);
+ char ErrorMessage[MAXERRORLENGTH];
+ midiInGetErrorText(rc, (LPSTR)ErrorMessage, sizeof(ErrorMessage));
+ ::wxMessageBox(ErrorMessage, "Open MIDI Input", wxOK);
}
}
@@ -128,12 +128,17 @@
dev = MIDI_MAPPER;
//UINT rc = midiOutOpen(&mpState->hout, dev, 0L, 0L, 0L);
- UINT rc = midiOutOpen(&mpState->hout, dev, (DWORD)MidiOutProc, (DWORD)mpState, CALLBACK_FUNCTION);
+ UINT rc = midiOutOpen(
+ &mpState->hout,
+ dev,
+ (DWORD)MidiOutProc,
+ (DWORD)mpState,
+ CALLBACK_FUNCTION);
if (rc)
{
- char errtxt[200];
- midiOutGetErrorText(rc, (LPSTR)errtxt, sizeof(errtxt));
- wxMessageBox(errtxt, "open midi output", wxOK);
+ char ErrorMessage[MAXERRORLENGTH];
+ midiOutGetErrorText(rc, (LPSTR)ErrorMessage, sizeof(ErrorMessage));
+ ::wxMessageBox(ErrorMessage, "Open MIDI Output", wxOK);
}
}
@@ -148,7 +153,9 @@
timer_installed = TRUE;
}
if (!timer_installed)
- wxMessageBox("could not install timer", "midi timer", wxOK);
+ {
+ ::wxMessageBox("Could not install timer", "MIDI timer", wxOK);
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|