summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/osdnet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/osdnet.cpp')
-rw-r--r--src/osd/osdnet.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/osd/osdnet.cpp b/src/osd/osdnet.cpp
index 90a9297f92d..3e1cb3596e1 100644
--- a/src/osd/osdnet.cpp
+++ b/src/osd/osdnet.cpp
@@ -38,7 +38,6 @@ class osd_netdev *open_netdev(int id, class device_network_interface *ifdev, int
osd_netdev::osd_netdev(class device_network_interface *ifdev, int rate)
{
m_dev = ifdev;
- m_stop = false;
m_timer = ifdev->device().machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(osd_netdev::recv), this));
m_timer->adjust(attotime::from_hz(rate), 0, attotime::from_hz(rate));
}
@@ -47,10 +46,14 @@ osd_netdev::~osd_netdev()
{
}
+void osd_netdev::start()
+{
+ m_timer->enable(true);
+}
+
void osd_netdev::stop()
{
- m_stop = true;
- m_timer->reset();
+ m_timer->enable(false);
}
int osd_netdev::send(uint8_t *buf, int len)
@@ -63,7 +66,7 @@ void osd_netdev::recv(void *ptr, int param)
uint8_t *buf;
int len;
//const char atalkmac[] = { 0x09, 0x00, 0x07, 0xff, 0xff, 0xff };
- while((!m_stop) && (len = recv_dev(&buf)))
+ while(m_timer->enabled() && (len = recv_dev(&buf)))
{
#if 0
if(buf[0] & 1)