diff --git a/Source/Core/Common/Src/ChunkFile.h b/Source/Core/Common/Src/ChunkFile.h index 985504571f..96ffc21f02 100644 --- a/Source/Core/Common/Src/ChunkFile.h +++ b/Source/Core/Common/Src/ChunkFile.h @@ -48,8 +48,8 @@ public: enum Mode // also defined in pluginspecs.h. Didn't want to couple them. { MODE_READ = 1, - MODE_WRITE = 2, - MODE_MEASURE = 3, + MODE_WRITE, + MODE_MEASURE, }; u8 **ptr; diff --git a/Source/Core/Common/Src/x64Emitter.cpp b/Source/Core/Common/Src/x64Emitter.cpp index 1324cb7761..be525c8035 100644 --- a/Source/Core/Common/Src/x64Emitter.cpp +++ b/Source/Core/Common/Src/x64Emitter.cpp @@ -927,9 +927,10 @@ namespace Gen void AND (int bits, const OpArg &a1, const OpArg &a2) {WriteNormalOp(bits, nrmAND, a1, a2);} void OR (int bits, const OpArg &a1, const OpArg &a2) {WriteNormalOp(bits, nrmOR , a1, a2);} void XOR (int bits, const OpArg &a1, const OpArg &a2) {WriteNormalOp(bits, nrmXOR, a1, a2);} - void MOV (int bits, const OpArg &a1, const OpArg &a2) + inline void MOV (int bits, const OpArg &a1, const OpArg &a2) { - _assert_msg_(DYNA_REC, !a1.IsSimpleReg() || !a2.IsSimpleReg() || a1.GetSimpleReg() != a2.GetSimpleReg(), "Redundant MOV @ %p", code); + _assert_msg_(DYNA_REC, !a1.IsSimpleReg() || !a2.IsSimpleReg() || a1.GetSimpleReg() != a2.GetSimpleReg(), "Redundant MOV @ %p", + code); WriteNormalOp(bits, nrmMOV, a1, a2); } void TEST(int bits, const OpArg &a1, const OpArg &a2) {WriteNormalOp(bits, nrmTEST, a1, a2);} diff --git a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp index 421f8e28c9..a0e7c7c196 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp @@ -811,20 +811,23 @@ void LoadBPReg(u32 value0) BPWritten(opcode, changes, newval); } -// Never called? Should probably be called when loading a saved state. -// Needs testing though. +// Called when loading a saved state. +// Needs more testing though. void BPReload() { for (int i = 0; i < 254; i++) { switch (i) { - case 0x65: + + case 0x41: case 0x45: //GXSetDrawDone + case 0x52: + case 0x65: + case 0x67: // set gp metric? case BPMEM_PE_TOKEN_ID: case BPMEM_PE_TOKEN_INT_ID: - case 0x67: // set gp metric? - case 0x52: - break; + // Cases in which we DON'T want to reload the BP + continue; default: BPWritten(i, 0xFFFFFF, ((u32*)&bpmem)[i]); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index b99a4e778a..4776fb8af5 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -238,9 +238,9 @@ void Video_DoState(unsigned char **ptr, int mode) { PointerWrap p(ptr, mode); VideoCommon_DoState(p); - + // Refresh state. - if (mode == 1) // read + if (mode == PointerWrap::MODE_READ) BPReload(); }