aldelaro5 / dolphin-memory-engine

A RAM search made specifically to search, monitor and edit the Dolphin emulator's emulated memory
MIT License
171 stars 39 forks source link

Feature: Copy address of pointer level #160

Closed dreamsyntax closed 4 months ago

dreamsyntax commented 6 months ago

For pointers of n depth, you can "Browse memory at" to open the Memory Viewer to this address.

image

Currently there is no way to 'Copy' a particular depth's address. For example, given the below image: image

If I wanted to copy level 2's address for use in Dolphin's Breakpoint feature I have to manually open this Address edit pane and type it myself in Dolphin, or utilize the "Browse memory at" and then right click -> add to watch -> copy to clipboard rather than hitting ok -> closing the dialog.

This has the potential to be made much simpler by either allowing copying directly from the Address edit pane or adding a dialog option when right clicking an address in the watchlist.

jahorta commented 4 months ago

So I took a shot at this, but I would like some feedback before making a PR. I implemented a right click menu entry for copying the address, but I am unsure if I put it in a good position in the right click menu. Currently I have it below the copy option (see below), but it might also work below the browse at address option. Thoughts?

When right clicking a non-pointer Sample copy addresses non-pointer

When right clicking a pointer Sample Copy Addresses Pointer

dreamsyntax commented 4 months ago

So I took a shot at this, but I would like some feedback before making a PR. I implemented a right click menu entry for copying the address, but I am unsure if I put it in a good position in the right click menu. Currently I have it below the copy option (see below), but it might also work below the browse at address option. Thoughts?

When right clicking a non-pointer Sample copy addresses non-pointer

When right clicking a pointer Sample Copy Addresses Pointer

It looks good to me. I see it being an infrequent action. The positioning doesn't matter too much. I'm unclear on what keyboard shortcuts you picked, but that can be adjusted in the PR. You can open a "draft PR" so we can look at your code and try out the changes while its in a state you consider incomplete/not ready to merge.