platform (linux): fixup some more things

* Add KBM input, include winapi_stubs in other places (4JLibs), clean up some things
This commit is contained in:
Tropical authored and Anaël committed 2026-11-28 12:42:18 +01:00
1 parent 54e15cfb85
commit 489a9e5ad3
13 files changed
+98 -72

No files matched your search

+8 -8
View File
@@ -10,7 +10,7 @@
// This current socket implementation is for the creation of a single local link. 2 sockets can be created, one for either end of this local
// link, the end (0 or 1) is passed as a parameter to the ctor.
CRITICAL_SECTION Socket::s_hostQueueLock[2];
CRITICAL_SECTION Socket::s_hostQueueLock[2];
std::queue<byte> Socket::s_hostQueue[2];
Socket::SocketOutputStreamLocal *Socket::s_hostOutStream[2];
Socket::SocketInputStreamLocal *Socket::s_hostInStream[2];
@@ -27,7 +27,7 @@ void Socket::Initialise(ServerConnection *serverConnection)
for( int i = 0; i < 2; i++ )
{
if(TryEnterCriticalSection(&s_hostQueueLock[i]))
{
{
// Clear the queue
std::queue<byte> empty;
std::swap( s_hostQueue[i], empty );
@@ -64,7 +64,7 @@ Socket::Socket(bool response)
}
for( int i = 0; i < 2; i++ )
{
{
m_endClosed[i] = false;
}
m_socketClosedEvent = nullptr;
@@ -79,12 +79,12 @@ Socket::Socket(INetworkPlayer *player, bool response /* = false*/, bool hostLoca
for( int i = 0; i < 2; i++ )
{
InitializeCriticalSection(&m_queueLockNetwork[i]);
InitializeCriticalSection(&m_queueLockNetwork[i]);
m_inputStream[i] = nullptr;
m_outputStream[i] = nullptr;
m_outputStream[i] = nullptr;
m_endClosed[i] = false;
}
if(!response || hostLocal)
{
m_inputStream[0] = new SocketInputStreamNetwork(this,0);
@@ -465,7 +465,7 @@ void Socket::SocketOutputStreamNetwork::write(byteArray b)
}
void Socket::SocketOutputStreamNetwork::write(byteArray b, unsigned int offset, unsigned int length)
{
{
writeWithFlags(b, offset, length, 0);
}
@@ -542,4 +542,4 @@ void Socket::SocketOutputStreamNetwork::writeWithFlags(byteArray b, unsigned int
void Socket::SocketOutputStreamNetwork::close()
{
m_streamOpen = false;
}
}