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

Memory Editor Changing Bytes is Problematic #1787

Closed
RevenantBob opened this issue Jan 21, 2025 · 2 comments
Closed

Memory Editor Changing Bytes is Problematic #1787

RevenantBob opened this issue Jan 21, 2025 · 2 comments

Comments

@RevenantBob
Copy link

Describe the bug
When using the memory editor for N64 trying to overwrite a byte types 2 characters instead of 1 for the key input. For example, If I want to set a byte to "C0" when I type C on the keyboard I get "CC".

To Reproduce
Steps to reproduce the behavior:

  1. Load an N64 Rom
  2. Open Memory Editor from Tools
  3. Find a bye in RDRAM
  4. Try to edit byte

Expected behavior
Typing a character should only overwrite 1 character, not two.

Screenshots

Before typing C I have cursor in front of "22".

Image

After typing C once, 22 became CC, when it should have become C2.

Image

@remutro
Copy link
Contributor

remutro commented Jan 21, 2025

I could have sworn there was already an open issue for this but I'm having trouble locating it now. However this is a known issue. If it helps, the issue is Windows specific (works properly on Linux and MacOS).

More info:

Basically in hiro/windows/application.cpp it is reading in key presses, where in the Linux & MacOS implementations of application they do not. The memory editor window itself, on all platforms, is also trapping key press events. The presence of both on Windows results in it capturing input twice, and thus outputting this double input capture (you can comment out this part in windows/application.cpp and the memory editor works fine). I'm just not really sure why it was done differently for Windows. I looked at the commit at one point (long time ago, done by Near) where that change happened, but I don't think it was obvious as to why it needed to be special cased on this platform, or maybe I just didn't spend enough time trying to figure it out. Needs to be reviewed in more detail.

@invertego
Copy link
Contributor

Fixed by #1798

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants