Win32 - Ramwatch - fix so 2 byte is little endian with 2 byte, hacky needs to be cleaned up

This commit is contained in:
adelikat 2010-09-02 23:03:18 +00:00
parent 2b2b547617
commit 17e7c9f436
1 changed files with 9 additions and 1 deletions

View File

@ -59,6 +59,14 @@ bool ResetWatches();
unsigned int GetCurrentValue(AddressWatcher& watch)
{
unsigned int x = 0;
if (watch.Size == 2) //Do little endian
{
x = ReadValueAtHardwareAddress(watch.Address+1, 1) * 256;
x += ReadValueAtHardwareAddress(watch.Address, 1);
return x;
}
else
return ReadValueAtHardwareAddress(watch.Address, watch.Size == 'd' ? 4 : watch.Size == 'w' ? 2 : 1);
}