Skip to content

Commit

Permalink
Merge pull request #43 from webgeek1234/master
Browse files Browse the repository at this point in the history
Android NDK R22 Fix
  • Loading branch information
inactive123 committed Jan 1, 2021
2 parents f32e894 + 8ef6941 commit b65ded5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mednafen/snes/src/cpu/core/registers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ struct flag_t {
+ (d << 3) + (i << 2) + (z << 1) + (c << 0);
}

inline unsigned operator=(uint8 data) {
inline unsigned assign(uint8 data) {
n = data & 0x80; v = data & 0x40; m = data & 0x20; x = data & 0x10;
d = data & 0x08; i = data & 0x04; z = data & 0x02; c = data & 0x01;
return data;
}

inline unsigned operator|=(unsigned data) { return operator=(operator unsigned() | data); }
inline unsigned operator^=(unsigned data) { return operator=(operator unsigned() ^ data); }
inline unsigned operator&=(unsigned data) { return operator=(operator unsigned() & data); }
inline unsigned operator =(unsigned data) { return assign(data); }
inline unsigned operator|=(unsigned data) { return assign(operator unsigned() | data); }
inline unsigned operator^=(unsigned data) { return assign(operator unsigned() ^ data); }
inline unsigned operator&=(unsigned data) { return assign(operator unsigned() & data); }

flag_t() : n(0), v(0), m(0), x(0), d(0), i(0), z(0), c(0) {}
};
Expand Down

0 comments on commit b65ded5

Please sign in to comment.