mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
small clean up
enabled njoy_test git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1563 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -67,7 +67,7 @@ dirs = [
|
|||||||
'Source/Plugins/Plugin_DSP_NULL/Src',
|
'Source/Plugins/Plugin_DSP_NULL/Src',
|
||||||
'Source/Plugins/Plugin_PadSimple/Src',
|
'Source/Plugins/Plugin_PadSimple/Src',
|
||||||
'Source/Plugins/Plugin_nJoy_SDL/Src',
|
'Source/Plugins/Plugin_nJoy_SDL/Src',
|
||||||
# 'Source/Plugins/Plugin_nJoy_Testing/Src',
|
'Source/Plugins/Plugin_nJoy_Testing/Src',
|
||||||
'Source/Plugins/Plugin_Wiimote/Src',
|
'Source/Plugins/Plugin_Wiimote/Src',
|
||||||
'Source/Core/DolphinWX/Src',
|
'Source/Core/DolphinWX/Src',
|
||||||
'Source/Core/DebuggerWX/Src',
|
'Source/Core/DebuggerWX/Src',
|
||||||
|
@ -132,12 +132,6 @@ inline u32 _rotr(u32 x, int shift) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define LONG int
|
#define LONG int
|
||||||
#ifdef __LINUX__
|
|
||||||
typedef union _LARGE_INTEGER
|
|
||||||
{
|
|
||||||
long long QuadPart;
|
|
||||||
} LARGE_INTEGER;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __forceinline
|
#ifndef __forceinline
|
||||||
#define __forceinline inline
|
#define __forceinline inline
|
||||||
|
@ -196,12 +196,12 @@ void LogInfo(const char *format, ...)
|
|||||||
void RunAllActive()
|
void RunAllActive()
|
||||||
{
|
{
|
||||||
if (Core::GetStartupParameter().bEnableCheats) {
|
if (Core::GetStartupParameter().bEnableCheats) {
|
||||||
for (std::vector<ARCode>::iterator iter = activeCodes.begin(); iter != activeCodes.end(); ++iter)
|
for (std::vector<ARCode>::iterator i = activeCodes.begin(); i != activeCodes.end(); ++i)
|
||||||
{
|
{
|
||||||
if (iter->active)
|
if (i->active)
|
||||||
{
|
{
|
||||||
if (!RunCode(*iter))
|
if (!RunCode(*i))
|
||||||
iter->active = false;
|
i->active = false;
|
||||||
LogInfo("\n");
|
LogInfo("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/ucontext.h> // Look in here for the context definition.
|
#include <sys/ucontext.h> // Look in here for the context definition.
|
||||||
#ifdef __LINUX__
|
#ifdef __linux__
|
||||||
#define CREG_RAX(ctx) (ctx)->gregs[REG_RAX]
|
#define CREG_RAX(ctx) (ctx)->gregs[REG_RAX]
|
||||||
#define CREG_RIP(ctx) (ctx)->gregs[REG_RIP]
|
#define CREG_RIP(ctx) (ctx)->gregs[REG_RIP]
|
||||||
#define CREG_EAX(ctx) (ctx)->gregs[REG_EAX]
|
#define CREG_EAX(ctx) (ctx)->gregs[REG_EAX]
|
||||||
|
@ -288,9 +288,7 @@ void FixUpInternalBranches(CodeOp *code, int begin, int end)
|
|||||||
// IMPORTANT - CURRENTLY ASSUMES THAT A IS A COMPARE
|
// IMPORTANT - CURRENTLY ASSUMES THAT A IS A COMPARE
|
||||||
bool CanSwapAdjacentOps(const CodeOp &a, const CodeOp &b)
|
bool CanSwapAdjacentOps(const CodeOp &a, const CodeOp &b)
|
||||||
{
|
{
|
||||||
const GekkoOPInfo *a_info = GetOpInfo(a.inst);
|
|
||||||
const GekkoOPInfo *b_info = GetOpInfo(b.inst);
|
const GekkoOPInfo *b_info = GetOpInfo(b.inst);
|
||||||
int a_flags = a_info->flags;
|
|
||||||
int b_flags = b_info->flags;
|
int b_flags = b_info->flags;
|
||||||
if (b_flags & (FL_SET_CRx | FL_ENDBLOCK | FL_TIMER | FL_EVIL))
|
if (b_flags & (FL_SET_CRx | FL_ENDBLOCK | FL_TIMER | FL_EVIL))
|
||||||
return false;
|
return false;
|
||||||
@ -324,21 +322,20 @@ bool CanSwapAdjacentOps(const CodeOp &a, const CodeOp &b)
|
|||||||
// That is, check that none of b's outputs matches any of a's inputs,
|
// That is, check that none of b's outputs matches any of a's inputs,
|
||||||
// and that none of a's outputs matches any of b's inputs.
|
// and that none of a's outputs matches any of b's inputs.
|
||||||
// The latter does not apply if a is a cmp, of course, but doesn't hurt to check.
|
// The latter does not apply if a is a cmp, of course, but doesn't hurt to check.
|
||||||
bool no_swap = false;
|
|
||||||
for (int j = 0; j < 3; j++)
|
for (int j = 0; j < 3; j++)
|
||||||
{
|
{
|
||||||
int regInA = a.regsIn[j];
|
int regInA = a.regsIn[j];
|
||||||
int regInB = b.regsIn[j];
|
int regInB = b.regsIn[j];
|
||||||
if (regInA >= 0 &&
|
if (regInA >= 0 &&
|
||||||
b.regsOut[0] == regInA ||
|
(b.regsOut[0] == regInA ||
|
||||||
b.regsOut[1] == regInA)
|
b.regsOut[1] == regInA))
|
||||||
{
|
{
|
||||||
// reg collision! don't swap
|
// reg collision! don't swap
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (regInB >= 0 &&
|
if (regInB >= 0 &&
|
||||||
a.regsOut[0] == regInB ||
|
(a.regsOut[0] == regInB ||
|
||||||
a.regsOut[1] == regInB)
|
a.regsOut[1] == regInB))
|
||||||
{
|
{
|
||||||
// reg collision! don't swap
|
// reg collision! don't swap
|
||||||
return false;
|
return false;
|
||||||
|
@ -85,6 +85,6 @@ void CARCodeAddEdit::UpdateTextCtrl(ActionReplay::ARCode arCode)
|
|||||||
{
|
{
|
||||||
EditCheatCode->Clear();
|
EditCheatCode->Clear();
|
||||||
|
|
||||||
for (int i = 0; i < arCode.ops.size(); i++)
|
for (u32 i = 0; i < arCode.ops.size(); i++)
|
||||||
EditCheatCode->AppendText(wxString::Format(wxT("%08X %08X\n"), arCode.ops.at(i).cmd_addr, arCode.ops.at(i).value));
|
EditCheatCode->AppendText(wxString::Format(wxT("%08X %08X\n"), arCode.ops.at(i).cmd_addr, arCode.ops.at(i).value));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user