maybe this fixes it
This commit is contained in:
parent
1d30b94987
commit
7fe88765fd
@ -33,11 +33,9 @@ static BaseConnectionWin Connection;
|
|||||||
|
|
||||||
bool BaseConnection::Open(int pipe)
|
bool BaseConnection::Open(int pipe)
|
||||||
{
|
{
|
||||||
std::wostringstream stream{};
|
wchar_t pipeName[]{L"\\\\?\\pipe\\discord-ipc-0"};
|
||||||
stream << L"\\\\?\\pipe\\discord-ipc-" << pipe;
|
|
||||||
std::wstring asString = stream.str();
|
|
||||||
const WCHAR* pipeName = asString.c_str();
|
|
||||||
const size_t pipeDigit = sizeof(pipeName) / sizeof(wchar_t) - 2;
|
const size_t pipeDigit = sizeof(pipeName) / sizeof(wchar_t) - 2;
|
||||||
|
pipeName[pipeDigit] = (L'%d', pipe);
|
||||||
auto self = reinterpret_cast<BaseConnectionWin*>(this);
|
auto self = reinterpret_cast<BaseConnectionWin*>(this);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
self->pipe = ::CreateFileW(
|
self->pipe = ::CreateFileW(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user