ref: cdacf59acecd944f4a573b3e112c0c43b052f975
parent: ff7fff78ec179f401a60b839eb522e08a9f5b5ca
author: Simon Howard <[email protected]>
date: Thu Feb 4 22:27:58 EST 2010
Add a hint message about permissions if unable to get I/O permissions for hardware OPL access. Subversion-branch: /branches/opl-branch Subversion-revision: 1844
--- a/opl/opl_linux.c
+++ b/opl/opl_linux.c
@@ -47,6 +47,14 @@
{
fprintf(stderr, "Failed to get I/O port permissions for 0x%x: %s\n",
port_base, strerror(errno));
+
+ if (errno == EPERM)
+ {
+ fprintf(stderr,
+ "\tYou may need to run the program as root in order\n"
+ "\tto acquire I/O port permissions for OPL MIDI playback.\n");
+ }
+
return 0;
}