diff options
| author | nakeee <nakeee@gmail.com> | 2009-05-07 09:50:48 +0000 |
|---|---|---|
| committer | nakeee <nakeee@gmail.com> | 2009-05-07 09:50:48 +0000 |
| commit | ab1bda745feaeda48cbba4c4e8878d0df0aa5272 (patch) | |
| tree | b3060b59d68d683d610eac095df6bcc1a1c3a6b8 /Source | |
| parent | 14f9d84e609829e377ff0e2feae8fc9aec078783 (diff) | |
small printresult change (from ector)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3170 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/DSPSpy/util/printresult.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/DSPSpy/util/printresult.cpp b/Source/DSPSpy/util/printresult.cpp index 5ea511b9af..562032fc74 100644 --- a/Source/DSPSpy/util/printresult.cpp +++ b/Source/DSPSpy/util/printresult.cpp @@ -1,15 +1,18 @@ #include <stdio.h> #include <stdlib.h> -#include <arpa/inet.h> typedef unsigned short u16; u16 reg_in[32], reg_out[1000][32]; +inline u16 swap16(u16 s) { + return (s >> 8) | (s << 8); +} + void printRegs(u16 *lastRegs, u16 *regs) { for (int i = 0; i < 32; i++) { if (! lastRegs || lastRegs[i] != regs[i]) { - printf("%02x %04x ", i, htons(regs[i])); + printf("%02x %04x ", i, swap16(regs[i])); } else { printf(" "); } |
