From 7a957134968963a1c53f635afbb91c53b15d9e2b Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 5 Jan 2013 22:45:32 -0600 Subject: Fix some warnings. Changes suggested by nerzhultheking. --- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core') diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index 47737326f4..c5ea6fcb06 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -253,15 +253,15 @@ void DoState(PointerWrap &p) u32 i; for (i=0; i Date: Mon, 7 Jan 2013 12:25:18 +1100 Subject: Fixed the infinite rumble problem caused by r4d6056f14625. --- Source/Core/Core/Src/HW/GCPad.cpp | 8 ++++++-- Source/Core/Core/Src/HW/GCPadEmu.cpp | 15 +++++++++++++-- Source/Core/Core/Src/HW/GCPadEmu.h | 1 + .../Src/ControllerInterface/DInput/DInputJoystick.cpp | 6 +----- 4 files changed, 21 insertions(+), 9 deletions(-) (limited to 'Source/Core') diff --git a/Source/Core/Core/Src/HW/GCPad.cpp b/Source/Core/Core/Src/HW/GCPad.cpp index 61b666af12..68ba3ab88a 100644 --- a/Source/Core/Core/Src/HW/GCPad.cpp +++ b/Source/Core/Core/Src/HW/GCPad.cpp @@ -105,6 +105,10 @@ void Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength) { ((GCPad*)g_plugin.controllers[ _numPAD ])->SetOutput(255); } + else + { + ((GCPad*)g_plugin.controllers[ _numPAD ])->SetOutput(0); + } } } @@ -123,9 +127,9 @@ void Motor(u8 _numPAD, unsigned int _uType, unsigned int _uStrength) { // TODO: this has potential to not stop rumble if user is messing with GUI at the perfect time // set rumble - if (_uType == 06) + if (_uType == 6) { - ((GCPad*)g_plugin.controllers[ _numPAD ])->SetOutput(_uStrength); + ((GCPad*)g_plugin.controllers[ _numPAD ])->SetMotor(_uStrength); } } } diff --git a/Source/Core/Core/Src/HW/GCPadEmu.cpp b/Source/Core/Core/Src/HW/GCPadEmu.cpp index 5233ed2877..a2c0c2afa9 100644 --- a/Source/Core/Core/Src/HW/GCPadEmu.cpp +++ b/Source/Core/Core/Src/HW/GCPadEmu.cpp @@ -130,15 +130,26 @@ void GCPad::GetInput(SPADStatus* const pad) } } -void GCPad::SetOutput(const u8 on) +void GCPad::SetMotor(const u8 on) { + float state = (float)on / 255; + float force = abs(state - 0.5) * 2; + if (state < 0.5) + force = -force; + // only rumble if window has focus or background input is enabled if (Host_RendererHasFocus() || m_options[0].settings[0]->value) - m_rumble->controls[0]->control_ref->State((float)on / 255); + m_rumble->controls[0]->control_ref->State(force); else m_rumble->controls[0]->control_ref->State(0); } +void GCPad::SetOutput(const u8 on) +{ + // only rumble if window has focus or background input is enabled + m_rumble->controls[0]->control_ref->State(on && (Host_RendererHasFocus() || m_options[0].settings[0]->value)); +} + void GCPad::LoadDefaults(const ControllerInterface& ciface) { #define set_control(group, num, str) (group)->controls[num]->control_ref->expression = (str) diff --git a/Source/Core/Core/Src/HW/GCPadEmu.h b/Source/Core/Core/Src/HW/GCPadEmu.h index cf0940245e..e57e6b0b68 100644 --- a/Source/Core/Core/Src/HW/GCPadEmu.h +++ b/Source/Core/Core/Src/HW/GCPadEmu.h @@ -29,6 +29,7 @@ public: GCPad(const unsigned int index); void GetInput(SPADStatus* const pad); void SetOutput(const u8 on); + void SetMotor(const u8 on); bool GetMicButton() const; diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp index b7ac3bf82e..af6ee7e77c 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp @@ -535,11 +535,7 @@ ControlState Joystick::Hat::GetState() const void Joystick::ForceConstant::SetState(const ControlState state) { - float force = abs(state - 0.5) * 2; - if (state < 0.5) - force = -force; - - const LONG new_val = LONG(10000 * force); + const LONG new_val = LONG(10000 * state); LONG &val = params.lMagnitude; if (val != new_val) -- cgit v1.2.3 From d0301ca89d318d8d6e3e7fde9c4b60e470e184e4 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 7 Jan 2013 13:47:34 -0600 Subject: Revert 30dd9c2 e9d00bf db5f4c8 and bff0fae --- Source/Core/Common/Src/MathUtil.h | 2 -- Source/Core/VideoCommon/Src/BPFunctions.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'Source/Core') diff --git a/Source/Core/Common/Src/MathUtil.h b/Source/Core/Common/Src/MathUtil.h index c5f613ada1..a6290ff602 100644 --- a/Source/Core/Common/Src/MathUtil.h +++ b/Source/Core/Common/Src/MathUtil.h @@ -117,8 +117,6 @@ struct Rectangle Rectangle(T theLeft, T theTop, T theRight, T theBottom) : left(theLeft), top(theTop), right(theRight), bottom(theBottom) { } - - bool operator==(const Rectangle& r) { return left==r.left && top==r.top && right==r.right && bottom==r.bottom; } T GetWidth() const { return abs(right - left); } T GetHeight() const { return abs(bottom - top); } diff --git a/Source/Core/VideoCommon/Src/BPFunctions.cpp b/Source/Core/VideoCommon/Src/BPFunctions.cpp index b9a76ba7b6..cddeae3000 100644 --- a/Source/Core/VideoCommon/Src/BPFunctions.cpp +++ b/Source/Core/VideoCommon/Src/BPFunctions.cpp @@ -236,7 +236,7 @@ bool GetConfig(const int &type) case CONFIG_DISABLEFOG: return g_ActiveConfig.bDisableFog; case CONFIG_SHOWEFBREGIONS: - return g_ActiveConfig.bShowEFBCopyRegions; + return false; default: PanicAlert("GetConfig Error: Unknown Config Type!"); return false; -- cgit v1.2.3 From bb7c262539a5b2b663bbec065e9120fa9fb21e46 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Mon, 7 Jan 2013 16:50:48 -0600 Subject: Add a linux .desktop file to add dolphin-emu to the menu, and install it when running 'make install'. --- Source/Core/DolphinWX/resources/dolphin-emu.desktop | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Source/Core/DolphinWX/resources/dolphin-emu.desktop (limited to 'Source/Core') diff --git a/Source/Core/DolphinWX/resources/dolphin-emu.desktop b/Source/Core/DolphinWX/resources/dolphin-emu.desktop new file mode 100644 index 0000000000..0ce4678f00 --- /dev/null +++ b/Source/Core/DolphinWX/resources/dolphin-emu.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Dolphin-emu +Comment=A Wii/GameCube Emulator +Icon=dolphin-emu +Exec=dolphin-emu +Categories=Game; + -- cgit v1.2.3 From 8cfceb1186c80a4ad94618cfa8d8aa942134247e Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 8 Jan 2013 00:00:30 +0100 Subject: Disable swapping cmp with instructions potentially raising interrupts Workaround for issue 5864 disabling parts of an optimization in the JIT. This is not the best solution to fix this issue, but at least it does not crash. --- Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'Source/Core') diff --git a/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp index ddfec1c328..fa9f278c29 100644 --- a/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp @@ -246,17 +246,13 @@ bool CanSwapAdjacentOps(const CodeOp &a, const CodeOp &b) return false; } - // For now, only integer ops acceptable. - switch (b_info->type) { - case OPTYPE_INTEGER: - case OPTYPE_LOAD: - case OPTYPE_STORE: - //case OPTYPE_LOADFP: - //case OPTYPE_STOREFP: - break; - default: + // For now, only integer ops acceptable. Any instruction which can raise an + // interrupt is *not* a possible swap candidate: see [1] for an example of + // a crash caused by this error. + // + // [1] https://code.google.com/p/dolphin-emu/issues/detail?id=5864#c7 + if (b_info->type != OPTYPE_INTEGER) return false; - } // Check that we have no register collisions. // That is, check that none of b's outputs matches any of a's inputs, -- cgit v1.2.3 From 6bd8474d054db7eafa546063e88f23e7ffe0d9d0 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Mon, 7 Jan 2013 17:05:51 -0600 Subject: Change the application name to "Dolphin Emulator" (from "Dolphin-emu"). --- Source/Core/DolphinWX/resources/dolphin-emu.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core') diff --git a/Source/Core/DolphinWX/resources/dolphin-emu.desktop b/Source/Core/DolphinWX/resources/dolphin-emu.desktop index 0ce4678f00..f201f07f22 100644 --- a/Source/Core/DolphinWX/resources/dolphin-emu.desktop +++ b/Source/Core/DolphinWX/resources/dolphin-emu.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Version=1.0 Type=Application -Name=Dolphin-emu +Name=Dolphin Emulator Comment=A Wii/GameCube Emulator Icon=dolphin-emu Exec=dolphin-emu -- cgit v1.2.3