mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-21 18:22:33 +01:00
PINE: Fix socket naming for Mac and Linux to match protocol specification (#15906)
This commit fixes the socket file name for Mac and Linux users. Essentially, the port is now only concatenated to the socket name if it is different than the default port. This change was made to match with the specification of the PINE protocol and the other emulators implementing it.
This commit is contained in:
parent
1200bbe7cc
commit
20598960a5
13
3rdparty/pine/pine_server.h
vendored
13
3rdparty/pine/pine_server.h
vendored
@ -4,7 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include "Utilities/Thread.h"
|
||||
// IPC uses a concept of "slot" to be able to communicate with multiple
|
||||
// emulators at the same time, each slot should be unique to each emulator to
|
||||
// allow PnP and configurable by the end user so that several runs don't
|
||||
// conflict with each others
|
||||
#define IPC_DEFAULT_SLOT 28012
|
||||
|
||||
#include <string>
|
||||
#include "stdafx.h"
|
||||
#include <stdio.h>
|
||||
@ -568,7 +573,11 @@ namespace pine
|
||||
m_socket_name += "/rpcs3.sock";
|
||||
}
|
||||
|
||||
m_socket_name = fmt::format("%s.%d", m_socket_name, Impl::get_port());
|
||||
const int slot = Impl::get_port();
|
||||
if (slot != IPC_DEFAULT_SLOT)
|
||||
{
|
||||
fmt::append(m_socket_name, ".%d", slot);
|
||||
}
|
||||
|
||||
struct sockaddr_un server;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user