|
[openMSX-commits] CVS: openMSX/src PluggingController.cc,1.35,1.36 PrinterPortSimpl.cc,1.13,1.14
From: Wouter Vermaelen <m9710797@us...> - 2003-10-28 21:34
|
Update of /cvsroot/openmsx/openMSX/src
In directory sc8-pr-cvs1:/tmp/cvs-serv16301/src
Modified Files:
PluggingController.cc PrinterPortSimpl.cc
Log Message:
added descriptions to sounddevices
Index: PluggingController.cc
===================================================================
RCS file: /cvsroot/openmsx/openMSX/src/PluggingController.cc,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- PluggingController.cc 27 Oct 2003 19:09:26 -0000 1.35
+++ PluggingController.cc 28 Oct 2003 21:34:49 -0000 1.36
@@ -266,9 +266,14 @@
result += (*it)->getName() + '\n';
}
break;
- case 3:
- result = controller->getPluggable(tokens[2])->getDescription();
+ case 3: {
+ const Pluggable* pluggable = controller->getPluggable(tokens[2]);
+ if (!pluggable) {
+ throw CommandException("No such pluggable");
+ }
+ result = pluggable->getDescription();
break;
+ }
default:
throw CommandException("Too many parameters");
}
@@ -312,9 +317,14 @@
result += (*it)->getName() + '\n';
}
break;
- case 3:
- result = controller->getConnector(tokens[2])->getDescription();
+ case 3: {
+ const Connector* connector = controller->getConnector(tokens[2]);
+ if (!connector) {
+ throw CommandException("No such connector");
+ }
+ result = connector->getDescription();
break;
+ }
default:
throw CommandException("Too many parameters");
}
Index: PrinterPortSimpl.cc
===================================================================
RCS file: /cvsroot/openmsx/openMSX/src/PrinterPortSimpl.cc,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- PrinterPortSimpl.cc 26 Oct 2003 14:02:19 -0000 1.13
+++ PrinterPortSimpl.cc 28 Oct 2003 21:34:49 -0000 1.14
@@ -35,7 +35,7 @@
throw()
{
short volume = 12000; // TODO read from config
- dac = new DACSound8U("simpl", volume, time);
+ dac = new DACSound8U("simpl", getDescription(), volume, time);
}
void PrinterPortSimpl::unplug(const EmuTime &time)
|
| Thread | Author | Date |
|---|---|---|
| [openMSX-commits] CVS: openMSX/src PluggingController.cc,1.35,1.36 PrinterPortSimpl.cc,1.13,1.14 | Wouter Vermaelen <m9710797@us...> |