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
This commit is contained in:
Simon Howard 2010-02-05 03:27:58 +00:00
parent ff7fff78ec
commit cdacf59ace

View file

@ -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;
}