summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2026-05-16 00:25:16 +1000
committer Vas Crabb <vas@vastheman.com>2026-05-16 00:25:16 +1000
commitbc6ef4e1ac6229bd8ac8ab96fa622bdac02a25be (patch)
tree5d46e3a3fe62cbfe2c532922d8dbf4a19acd06a1 /src
parent4e93fc2bf0f6acf91ebf8bb3b8d2db3036a688f8 (diff)
-taito/gunbustr_link.cpp: Fixed copy/paste bug in reconnect code.
-capcom/cps2comm.cpp: Set NODELAY option on sockets as it uses small packets and can be sensitive to latency.
Diffstat (limited to 'src')
-rw-r--r--src/mame/capcom/cps2.cpp4
-rw-r--r--src/mame/capcom/cps2comm.cpp8
-rw-r--r--src/mame/taito/gunbustr_link.cpp34
3 files changed, 19 insertions, 27 deletions
diff --git a/src/mame/capcom/cps2.cpp b/src/mame/capcom/cps2.cpp
index e5171adc90a..8602b6ca48c 100644
--- a/src/mame/capcom/cps2.cpp
+++ b/src/mame/capcom/cps2.cpp
@@ -1408,11 +1408,11 @@ static INPUT_PORTS_START( cps2_4p4b )
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN )
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_VOLUME_UP )
- // Machine configuration for dev hardware with DIPs
+ // Machine configuration for dev hardware with DIP switches
PORT_START( "HW_TYPE" )
PORT_CONFNAME( 0x01, 0x00, "Hardware" )
PORT_CONFSETTING( 0x00, "Production" )
- PORT_CONFSETTING( 0x01, "Development (Enable Debug DIPs)" )
+ PORT_CONFSETTING( 0x01, "Development (with debug DIP switches)" )
PORT_START("DSWA")
PORT_DIPNAME( 0x01, 0x01, "1-1" ) PORT_DIPLOCATION("SW1:1") PORT_CONDITION("HW_TYPE", 0x01, EQUALS, 0x01)
diff --git a/src/mame/capcom/cps2comm.cpp b/src/mame/capcom/cps2comm.cpp
index 7882d39a73d..985e0ad22ca 100644
--- a/src/mame/capcom/cps2comm.cpp
+++ b/src/mame/capcom/cps2comm.cpp
@@ -143,6 +143,8 @@ public:
if (m_remote)
{
m_in_sock.open(m_remote->protocol(), err);
+ if (!err)
+ m_in_sock.set_option(asio::ip::tcp::no_delay(true), err);
if (err)
return err;
}
@@ -347,8 +349,10 @@ private:
{
LOG("Accepting OUT port connection on %s\n", *m_local);
m_acceptor.async_accept(
- [this] (std::error_code const &err, asio::ip::tcp::socket sock)
+ [this] (std::error_code err, asio::ip::tcp::socket sock)
{
+ if (!err)
+ sock.set_option(asio::ip::tcp::no_delay(true), err);
if (err)
{
LOG("Error accepting OUT port connection: %s\n", err.message());
@@ -412,6 +416,8 @@ private:
{
std::error_code e;
m_in_sock.open(m_remote->protocol(), e);
+ if (!e)
+ m_in_sock.set_option(asio::ip::tcp::no_delay(true), e);
if (e)
{
LOG("Error opening IN port socket: %s\n", e.message());
diff --git a/src/mame/taito/gunbustr_link.cpp b/src/mame/taito/gunbustr_link.cpp
index 73f933f117e..9053b79014c 100644
--- a/src/mame/taito/gunbustr_link.cpp
+++ b/src/mame/taito/gunbustr_link.cpp
@@ -140,20 +140,11 @@ public:
if (m_remote)
{
- if (m_local)
- {
- m_sock.open(m_local->protocol(), err);
- if (!err)
- m_sock.set_option(asio::ip::tcp::no_delay(true), err);
- if (!err)
- m_sock.bind(*m_local, err);
- }
- else
- {
- m_sock.open(m_remote->protocol(), err);
- if (!err)
- m_sock.set_option(asio::ip::tcp::no_delay(true), err);
- }
+ m_sock.open((m_local ? m_local : m_remote)->protocol(), err);
+ if (!err)
+ m_sock.set_option(asio::ip::tcp::no_delay(true), err);
+ if (!err && m_local)
+ m_sock.bind(*m_local, err);
}
else
{
@@ -307,16 +298,11 @@ private:
if (!err && !m_stopping)
{
std::error_code e;
- if (m_local)
- {
- m_sock.open(m_local->protocol(), e);
- if (!err)
- m_sock.bind(*m_local, e);
- }
- else
- {
- m_sock.open(m_remote->protocol(), e);
- }
+ m_sock.open((m_local ? m_local : m_remote)->protocol(), e);
+ if (!e)
+ m_sock.set_option(asio::ip::tcp::no_delay(true), e);
+ if (!e && m_local)
+ m_sock.bind(*m_local, e);
if (e)
{
LOG("Error opening socket: %s\n", e.message());