-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
base: master
Are you sure you want to change the base?
Conversation
Source/Core/Core/MemoryWatcher.cpp
Outdated
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.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Core/MemoryWatcher.h
Outdated
@@ -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.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Core/MemoryWatcher.h
Outdated
@@ -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.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Core/MemoryWatcher.h
Outdated
@@ -37,8 +43,13 @@ class MemoryWatcher final | |||
|
|||
bool m_running; | |||
|
|||
#ifdef _WIN32 | |||
HANDLE m_pipe; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Could you squash the commits into one? |
Source/Core/Core/MemoryWatcher.h
Outdated
@@ -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.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Squashed the commits. |
Source/Core/Core/MemoryWatcher.cpp
Outdated
@@ -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.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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
Code-wise this looks good to me, haven't tested it though. |
Unfortunately, MemoryWatcher was removed in #8050. |
Reopening since #8050 was reverted. |
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... |
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).