summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2010-02-05 03:27:58 +0000
committerSimon Howard2010-02-05 03:27:58 +0000
commitcdacf59acecd944f4a573b3e112c0c43b052f975 (patch)
treeff7547c70cffa67d8d1dd19497853bd8670f4d10
parentff7fff78ec179f401a60b839eb522e08a9f5b5ca (diff)
downloadchocolate-doom-cdacf59acecd944f4a573b3e112c0c43b052f975.tar.gz
chocolate-doom-cdacf59acecd944f4a573b3e112c0c43b052f975.tar.bz2
chocolate-doom-cdacf59acecd944f4a573b3e112c0c43b052f975.zip
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
-rw-r--r--opl/opl_linux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/opl/opl_linux.c b/opl/opl_linux.c
index 089192c9..319686b8 100644
--- a/opl/opl_linux.c
+++ b/opl/opl_linux.c
@@ -47,6 +47,14 @@ static int OPL_Linux_Init(unsigned int port_base)
{
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;
}