From df3aecafef68d0c5857e05f7d17d90ab5281c6d2 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Mon, 17 Jan 2011 01:47:27 +0000 Subject: [PATCH] Remove some dead code. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6868 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/EXI_Channel.cpp | 2 +- Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp | 2 +- .../Core/Src/HW/SI_DeviceGCController.cpp | 4 -- Source/Core/Core/Src/OnFrame.cpp | 65 +------------------ Source/Core/Core/Src/OnFrame.h | 8 +-- Source/Core/DolphinWX/Src/AboutDolphin.cpp | 2 +- 6 files changed, 6 insertions(+), 77 deletions(-) diff --git a/Source/Core/Core/Src/HW/EXI_Channel.cpp b/Source/Core/Core/Src/HW/EXI_Channel.cpp index 0d28c7ce08..9ab0fd13d3 100644 --- a/Source/Core/Core/Src/HW/EXI_Channel.cpp +++ b/Source/Core/Core/Src/HW/EXI_Channel.cpp @@ -263,4 +263,4 @@ void CEXIChannel::Write32(const u32 _iValue, const u32 _iRegister) m_ImmData = _iValue; break; } -} \ No newline at end of file +} diff --git a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp index 9f5616c0e2..f1b9fe88ae 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp @@ -114,7 +114,7 @@ void CEXIGecko::ImmReadWrite(u32 &_uData, u32 _uSize) { if (!client.IsValid()) if (!GetAvailableSock(client)) - ;// TODO nothing for now + {} ;// TODO nothing for now // for debug u32 oldval = _uData; diff --git a/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp b/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp index df836011af..dbd4c8db20 100644 --- a/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp +++ b/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp @@ -145,10 +145,6 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low) Frame::PlayController(&PadStatus, ISIDevice::m_iDeviceNumber); else { - // Only pad 0 is allowed to autofire right now - if(Frame::IsAutoFiring() && ISIDevice::m_iDeviceNumber == 0) - Frame::ModifyController(&PadStatus, 0); - if(Frame::IsRecordingInput()) Frame::RecordInput(&PadStatus, ISIDevice::m_iDeviceNumber); } diff --git a/Source/Core/Core/Src/OnFrame.cpp b/Source/Core/Core/Src/OnFrame.cpp index 02cc077390..7185500099 100644 --- a/Source/Core/Core/Src/OnFrame.cpp +++ b/Source/Core/Core/Src/OnFrame.cpp @@ -30,8 +30,6 @@ namespace Frame { bool g_bFrameStep = false; bool g_bFrameStop = false; -bool g_bAutoFire = false; -u32 g_autoFirstKey = 0, g_autoSecondKey = 0; u32 g_rerecords = 0; bool g_bFirstKey = true; PlayMode g_playMode = MODE_NONE; @@ -66,9 +64,6 @@ void FrameUpdate() if(g_framesToSkip) FrameSkipping(); - if (g_bAutoFire) - g_bFirstKey = !g_bFirstKey; - g_bPolled = false; } @@ -97,70 +92,14 @@ void SetPolledDevice() g_bPolled = true; } -void SetAutoHold(bool bEnabled, u32 keyToHold) -{ - g_bAutoFire = bEnabled; - if (bEnabled) - g_autoFirstKey = g_autoSecondKey = keyToHold; - else - g_autoFirstKey = g_autoSecondKey = 0; -} - -void SetAutoFire(bool bEnabled, u32 keyOne, u32 keyTwo) -{ - g_bAutoFire = bEnabled; - if (bEnabled) { - g_autoFirstKey = keyOne; - g_autoSecondKey = keyTwo; - } else - g_autoFirstKey = g_autoSecondKey = 0; - - g_bFirstKey = true; -} - -bool IsAutoFiring() -{ - return g_bAutoFire; -} - void SetFrameStepping(bool bEnabled) { g_bFrameStep = bEnabled; } -void SetFrameStopping(bool bEnabled) { - g_bFrameStop = bEnabled; -} -void ModifyController(SPADStatus *PadStatus, int controllerID) +void SetFrameStopping(bool bEnabled) { - if(controllerID < 0) - return; - - u32 keyToPress = (g_bFirstKey) ? g_autoFirstKey : g_autoSecondKey; - - if (!keyToPress) - return; - - PadStatus->button |= keyToPress; - - switch(keyToPress) { - default: - return; - - case PAD_BUTTON_A: - PadStatus->analogA = 255; - break; - case PAD_BUTTON_B: - PadStatus->analogB = 255; - break; - - case PAD_TRIGGER_L: - PadStatus->triggerLeft = 255; - break; - case PAD_TRIGGER_R: - PadStatus->triggerRight = 255; - break; - } + g_bFrameStop = bEnabled; } void FrameSkipping() diff --git a/Source/Core/Core/Src/OnFrame.h b/Source/Core/Core/Src/OnFrame.h index 5e02a9f61a..695e4bb69c 100644 --- a/Source/Core/Core/Src/OnFrame.h +++ b/Source/Core/Core/Src/OnFrame.h @@ -50,8 +50,7 @@ struct ControllerState { #pragma pack(pop) // Global declarations -extern bool g_bFrameStep, g_bAutoFire, g_bFirstKey, g_bPolled; -extern u32 g_autoFirstKey, g_autoSecondKey; +extern bool g_bFrameStep, g_bPolled; extern PlayMode g_playMode; extern unsigned int g_framesToSkip, g_frameSkipCounter; @@ -102,9 +101,6 @@ bool IsPlayingInput(); bool IsUsingPad(int controller); void ChangePads(); -void SetAutoHold(bool bEnabled, u32 keyToHold = 0); -void SetAutoFire(bool bEnabled, u32 keyOne = 0, u32 keyTwo = 0); - void SetFrameStepping(bool bEnabled); void SetFrameStopping(bool bEnabled); @@ -112,8 +108,6 @@ void SetFrameSkipping(unsigned int framesToSkip); int FrameSkippingFactor(); void FrameSkipping(); -void ModifyController(SPADStatus *PadStatus, int controllerID); - bool BeginRecordingInput(int controllers); void RecordInput(SPADStatus *PadStatus, int controllerID); diff --git a/Source/Core/DolphinWX/Src/AboutDolphin.cpp b/Source/Core/DolphinWX/Src/AboutDolphin.cpp index 1498b697ed..a74cc91b73 100644 --- a/Source/Core/DolphinWX/Src/AboutDolphin.cpp +++ b/Source/Core/DolphinWX/Src/AboutDolphin.cpp @@ -48,7 +48,7 @@ void AboutDolphin::CreateGUIControls() wxBitmap(iDolphinLogo), wxDefaultPosition, wxDefaultSize, 0); std::string Text = std::string(svn_rev_str) + "\n" - "Copyright (c) 2003-2010+ Dolphin Team\n" + "Copyright (c) 2003-2011+ Dolphin Team\n" "\n" "Dolphin is a Gamecube/Wii emulator, which was\n" "originally written by F|RES and ector.\n"