Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Windows support for MemoryWatcher #6138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emkooz
Copy link

@emkooz emkooz commented Oct 25, 2017

This adds Windows support for MemoryWatcher. It opens a Windows named pipe at \\\\.\\pipe\\Dolphin Emulator\\MemoryWatcher and sends everything there.

So far only tested against SSBM, everything looks to works OK. Compiles normally on Windows 10 and Linux (have not tested OSX).

m_pipe = CreateFile(L"\\\\.\\pipe\\Dolphin Emulator\\MemoryWatcher",
GENERIC_READ | GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);

if (m_pipe == INVALID_HANDLE_VALUE)

This comment was marked as off-topic.

@@ -5,10 +5,16 @@
#pragma once

#include <map>
#ifdef _WIN32
#include <Windows.h>

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@@ -37,8 +43,13 @@ class MemoryWatcher final

bool m_running;

#ifdef _WIN32
HANDLE m_pipe;
DWORD m_written;

This comment was marked as off-topic.

@@ -37,8 +43,13 @@ class MemoryWatcher final

bool m_running;

#ifdef _WIN32
HANDLE m_pipe;

This comment was marked as off-topic.

@JosJuice
Copy link
Member

Could you squash the commits into one?

@@ -37,8 +41,13 @@ class MemoryWatcher final

bool m_running;

#ifdef _WIN32
void* m_pipe;
unsigned long m_written;

This comment was marked as off-topic.

This comment was marked as off-topic.

@emkooz
Copy link
Author

emkooz commented Nov 21, 2017

Squashed the commits.

@@ -122,8 +138,16 @@ void MemoryWatcher::Step()
// Update the value
current_value = new_value;
std::string message = ComposeMessage(address, new_value);
#ifdef _WIN32
unsigned long m_written;

This comment was marked as off-topic.

This comment was marked as off-topic.

Removed Windows.h, cleaned up types.

Fixed formatting to pass buildbot linter.

Moved dummy variable out of header.

MemoryWatcher: added Windows support

Fixed naming issue.

Actually fixed naming issue this time.

MemoryWatcher: Added Windows support
@Warepire
Copy link

Code-wise this looks good to me, haven't tested it though.

@leoetlino
Copy link
Member

Unfortunately, MemoryWatcher was removed in #8050.

@leoetlino leoetlino closed this May 1, 2019
@Tilka
Copy link
Member

Tilka commented Jun 2, 2019

Reopening since #8050 was reverted.

@Tilka Tilka reopened this Jun 2, 2019
@HoldYourWaffle
Copy link

Is there any chance of this getting updated to the current master? I'd love to use this feature on windows.

I'd take a shot at it myself, but I haven't done much in C++ except "Hello world" and basic pointer knowledge...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
8 participants