From 08d923ca6ff78c94dd06d32f8395a3dc375c6625 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Thu, 22 Nov 2018 23:00:56 -0500 Subject: [PATCH] recording: Append copyright headers Squashed commits: [47be08613] recording: Forgot to refactor the usage of std::size --- .gitignore | 3 +- pcsx2/Recording/InputRecording.cpp | 15 ++++++ pcsx2/Recording/InputRecording.h | 15 ++++++ pcsx2/Recording/InputRecordingFile.cpp | 25 ++++++++-- pcsx2/Recording/InputRecordingFile.h | 15 ++++++ pcsx2/Recording/KeyMovieFrame.cpp | 15 ++++++ pcsx2/Recording/KeyMovieFrame.h | 17 ++++++- pcsx2/Recording/NewRecordingFrame.cpp | 15 ++++++ pcsx2/Recording/NewRecordingFrame.h | 17 ++++++- pcsx2/Recording/PadData.cpp | 39 +++++++++++----- pcsx2/Recording/PadData.h | 15 ++++++ pcsx2/Recording/RecordingControls.cpp | 15 ++++++ pcsx2/Recording/RecordingControls.h | 17 ++++++- pcsx2/Recording/RecordingInputManager.cpp | 15 ++++++ pcsx2/Recording/RecordingInputManager.h | 15 ++++++ pcsx2/Recording/VirtualPad.cpp | 49 +++++++++++++------- pcsx2/Recording/VirtualPad.h | 15 ++++++ plugins/GSdx/GS.cpp | 2 +- plugins/GSdx/Renderers/Common/GSRenderer.cpp | 2 +- 19 files changed, 280 insertions(+), 41 deletions(-) diff --git a/.gitignore b/.gitignore index adf09f1d4a..375424120d 100644 --- a/.gitignore +++ b/.gitignore @@ -57,8 +57,7 @@ oprofile_data/ *.p2s *.p2m2 *.p2m2_backup -*.p2m -*.p2m_backup +*.p2m2_SaveState.p2s # Visual Studio upgrades /Backup* diff --git a/pcsx2/Recording/InputRecording.cpp b/pcsx2/Recording/InputRecording.cpp index 3af7026fe4..bb12c75b58 100644 --- a/pcsx2/Recording/InputRecording.cpp +++ b/pcsx2/Recording/InputRecording.cpp @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #include "PrecompiledHeader.h" #include "AppSaveStates.h" diff --git a/pcsx2/Recording/InputRecording.h b/pcsx2/Recording/InputRecording.h index 2b8e2d0872..3359d5306d 100644 --- a/pcsx2/Recording/InputRecording.h +++ b/pcsx2/Recording/InputRecording.h @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #pragma once #include "InputRecordingFile.h" diff --git a/pcsx2/Recording/InputRecordingFile.cpp b/pcsx2/Recording/InputRecordingFile.cpp index 31569b4458..f80f9fedf7 100644 --- a/pcsx2/Recording/InputRecordingFile.cpp +++ b/pcsx2/Recording/InputRecordingFile.cpp @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #include "PrecompiledHeader.h" #include "App.h" @@ -10,7 +25,7 @@ #define HEADER_SIZE (sizeof(InputRecordingHeader)+4+4) #define SAVESTATE_HEADER_SIZE (sizeof(bool)) -#define BLOCK_HEADER_SIZE (0) +#define BLOCK_HEADER_SIZE (0) #define BLOCK_DATA_SIZE (18*2) #define BLOCK_SIZE (BLOCK_HEADER_SIZE+BLOCK_DATA_SIZE) @@ -85,7 +100,7 @@ bool InputRecordingFile::writeSaveState() { return false; fseek(recordingFile, SEEKPOINT_SAVESTATE, SEEK_SET); - if (fwrite(&savestate.fromSavestate, sizeof(bool), 1, recordingFile) != 1) + if (fwrite(&savestate.fromSavestate, sizeof(bool), 1, recordingFile) != 1) return false; return true; @@ -200,14 +215,14 @@ bool InputRecordingFile::InsertPadData(unsigned long frame, const PadData& key) bool InputRecordingFile::UpdatePadData(unsigned long frame, const PadData& key) { - if (recordingFile == NULL) + if (recordingFile == NULL) return false; - if (!key.fExistKey) + if (!key.fExistKey) return false; long seek = _getBlockSeekPoint(frame) + BLOCK_HEADER_SIZE; fseek(recordingFile, seek, SEEK_SET); - if (fwrite(key.buf, 1, BLOCK_DATA_SIZE, recordingFile) == 0) + if (fwrite(key.buf, 1, BLOCK_DATA_SIZE, recordingFile) == 0) return false; fflush(recordingFile); diff --git a/pcsx2/Recording/InputRecordingFile.h b/pcsx2/Recording/InputRecordingFile.h index 908a711294..2a1df8cbfa 100644 --- a/pcsx2/Recording/InputRecordingFile.h +++ b/pcsx2/Recording/InputRecordingFile.h @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #pragma once #include "PadData.h" diff --git a/pcsx2/Recording/KeyMovieFrame.cpp b/pcsx2/Recording/KeyMovieFrame.cpp index c0518e2126..989a4def4f 100644 --- a/pcsx2/Recording/KeyMovieFrame.cpp +++ b/pcsx2/Recording/KeyMovieFrame.cpp @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #include "PrecompiledHeader.h" #include "NewRecordingFrame.h" diff --git a/pcsx2/Recording/KeyMovieFrame.h b/pcsx2/Recording/KeyMovieFrame.h index 7631bdac5f..fe070f60cf 100644 --- a/pcsx2/Recording/KeyMovieFrame.h +++ b/pcsx2/Recording/KeyMovieFrame.h @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #pragma once #include #include @@ -13,7 +28,7 @@ public: wxString getFile() const; wxString getAuthor() const; int getFrom() const; - + private: wxStaticText *m_fileLabel; wxFilePickerCtrl *m_filePicker; diff --git a/pcsx2/Recording/NewRecordingFrame.cpp b/pcsx2/Recording/NewRecordingFrame.cpp index c0518e2126..989a4def4f 100644 --- a/pcsx2/Recording/NewRecordingFrame.cpp +++ b/pcsx2/Recording/NewRecordingFrame.cpp @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #include "PrecompiledHeader.h" #include "NewRecordingFrame.h" diff --git a/pcsx2/Recording/NewRecordingFrame.h b/pcsx2/Recording/NewRecordingFrame.h index ad273270f1..020ac2dbb5 100644 --- a/pcsx2/Recording/NewRecordingFrame.h +++ b/pcsx2/Recording/NewRecordingFrame.h @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #pragma once #include @@ -14,7 +29,7 @@ public: wxString getFile() const; wxString getAuthor() const; int getFrom() const; - + private: wxStaticText *m_fileLabel; wxFilePickerCtrl *m_filePicker; diff --git a/pcsx2/Recording/PadData.cpp b/pcsx2/Recording/PadData.cpp index 487a9ea2b7..49c7fae618 100644 --- a/pcsx2/Recording/PadData.cpp +++ b/pcsx2/Recording/PadData.cpp @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #include "PrecompiledHeader.h" #include "Common.h" @@ -20,7 +35,7 @@ PadData::PadData() void PadData::logPadData(u8 port, u16 bufCount, u8 buf[512]) { // skip first two bytes because they dont seem to matter - if (port == 0 && bufCount > 2) + if (port == 0 && bufCount > 2) { if (bufCount == 3) { @@ -144,29 +159,29 @@ int PadData::getPressureByte(PadDataNormalButton button) const { // Pressure Byte Order // R - L - U - D - Tri - Sqr - Circle - Cross - L1 - R1 - L2 - R2 - if (button == UP) + if (button == UP) return 2; - else if (button == LEFT) + else if (button == LEFT) return 1; - else if (button == RIGHT) + else if (button == RIGHT) return 0; - else if (button == DOWN) + else if (button == DOWN) return 3; - else if (button == CROSS) + else if (button == CROSS) return 6; - else if (button == CIRCLE) + else if (button == CIRCLE) return 5; - else if (button == SQUARE) + else if (button == SQUARE) return 7; - else if (button == TRIANGLE) + else if (button == TRIANGLE) return 4; - else if (button == L1) + else if (button == L1) return 8; else if (button == L2) return 10; - else if (button == R1) + else if (button == R1) return 9; - else if (button == R2) + else if (button == R2) return 11; else return -1; diff --git a/pcsx2/Recording/PadData.h b/pcsx2/Recording/PadData.h index 4bd676654f..3c4f3d8c1f 100644 --- a/pcsx2/Recording/PadData.h +++ b/pcsx2/Recording/PadData.h @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #pragma once #include diff --git a/pcsx2/Recording/RecordingControls.cpp b/pcsx2/Recording/RecordingControls.cpp index 21ebeda7d8..5987e44191 100644 --- a/pcsx2/Recording/RecordingControls.cpp +++ b/pcsx2/Recording/RecordingControls.cpp @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #include "PrecompiledHeader.h" #include "GSFrame.h" diff --git a/pcsx2/Recording/RecordingControls.h b/pcsx2/Recording/RecordingControls.h index 054cf5ff5f..d31b0e1332 100644 --- a/pcsx2/Recording/RecordingControls.h +++ b/pcsx2/Recording/RecordingControls.h @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #pragma once class RecordingControls { @@ -21,7 +36,7 @@ public: private: uint stopFrameCount = false; - + bool fStop = false; bool fStart = false; bool fFrameAdvance = false; diff --git a/pcsx2/Recording/RecordingInputManager.cpp b/pcsx2/Recording/RecordingInputManager.cpp index ba73830ab0..0d7201607b 100644 --- a/pcsx2/Recording/RecordingInputManager.cpp +++ b/pcsx2/Recording/RecordingInputManager.cpp @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #include "PrecompiledHeader.h" #include "RecordingInputManager.h" diff --git a/pcsx2/Recording/RecordingInputManager.h b/pcsx2/Recording/RecordingInputManager.h index 93b7abee76..a1db5aeb28 100644 --- a/pcsx2/Recording/RecordingInputManager.h +++ b/pcsx2/Recording/RecordingInputManager.h @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #pragma once #include "PadData.h" diff --git a/pcsx2/Recording/VirtualPad.cpp b/pcsx2/Recording/VirtualPad.cpp index 61e1705209..64526a0fda 100644 --- a/pcsx2/Recording/VirtualPad.cpp +++ b/pcsx2/Recording/VirtualPad.cpp @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #include "PrecompiledHeader.h" #include "Common.h" @@ -15,7 +30,7 @@ wxEND_EVENT_TABLE() VirtualPad::VirtualPad(wxWindow* parent, wxWindowID id, const wxString& title, int controllerPort, const wxPoint& pos, const wxSize& size, long style) : wxFrame(parent, id, title, pos, size, wxDEFAULT_FRAME_STYLE) { - // Define components + // Define components SetSize(wxSize(1000, 700)); l2Button = new wxToggleButton(this, wxID_ANY, wxT("L2")); l2ButtonPressure = new wxSpinCtrl(this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 255); @@ -58,8 +73,8 @@ VirtualPad::VirtualPad(wxWindow* parent, wxWindowID id, const wxString& title, i VirtualPad::controllerPort = controllerPort; // NOTE: Order MATTERS, these match enum defined in PadData.h - wxToggleButton* tempButtons[16] = { - // Pressure sensitive buttons + wxToggleButton* tempButtons[16] = { + // Pressure sensitive buttons upButton, rightButton, leftButton, downButton, crossButton, circleButton, squareButton, triangleButton, l1Button, l2Button, r1Button, r2Button, @@ -85,23 +100,23 @@ VirtualPad::VirtualPad(wxWindow* parent, wxWindowID id, const wxString& title, i std::copy(std::begin(tempAnalogVals), std::end(tempAnalogVals), std::begin(analogVals)); // Setup event bindings - for (int i = 0; i < std::size(buttons); i++) + for (int i = 0; i < buttonsLength; i++) { (*buttons[i]).Bind(wxEVT_TOGGLEBUTTON, &VirtualPad::OnButtonPress, this); } - for (int i = 0; i < std::size(buttonsPressure); i++) + for (int i = 0; i < buttonsPressureLength; i++) { (*buttonsPressure[i]).Bind(wxEVT_SPINCTRL, &VirtualPad::OnPressureChange, this); } - for (int i = 0; i < std::size(analogSliders); i++) + for (int i = 0; i < analogSlidersLength; i++) { (*analogSliders[i]).Bind(wxEVT_SLIDER, &VirtualPad::OnAnalogSliderChange, this); } - for (int i = 0; i < std::size(analogVals); i++) + for (int i = 0; i < analogValsLength; i++) { (*analogVals[i]).Bind(wxEVT_SPINCTRL, &VirtualPad::OnAnalogValChange, this); } - + // Finalize layout SetProperties(); DoLayout(); @@ -138,14 +153,14 @@ void VirtualPad::OnButtonPress(wxCommandEvent & event) { wxToggleButton* pressedButton = (wxToggleButton*) event.GetEventObject(); int buttonId = -1; - for (int i = 0; i < std::size(buttons); i++) + for (int i = 0; i < buttonsLength; i++) { - if (pressedButton == buttons[i]) + if (pressedButton == buttons[i]) { buttonId = i; } } - if (buttonId != -1) + if (buttonId != -1) { u8 pressure = 0; if (event.IsChecked()) @@ -167,7 +182,7 @@ void VirtualPad::OnPressureChange(wxSpinEvent & event) { wxSpinCtrl* updatedSpinner = (wxSpinCtrl*) event.GetEventObject(); int spinnerId = -1; - for (int i = 0; i < std::size(buttonsPressure); i++) + for (int i = 0; i < buttonsPressureLength; i++) { if (updatedSpinner == buttonsPressure[i]) { @@ -189,7 +204,7 @@ void VirtualPad::OnAnalogSliderChange(wxCommandEvent & event) { wxSlider* movedSlider = (wxSlider*) event.GetEventObject(); int sliderId = -1; - for (int i = 0; i < std::size(analogSliders); i++) + for (int i = 0; i < analogSlidersLength; i++) { if (movedSlider == analogSliders[i]) { @@ -198,14 +213,14 @@ void VirtualPad::OnAnalogSliderChange(wxCommandEvent & event) } if (sliderId != -1) { - if (sliderId % 2 == 0) + if (sliderId % 2 == 0) { - analogVals[sliderId]->SetValue(event.GetInt()); + analogVals[sliderId]->SetValue(event.GetInt()); } else { analogVals[sliderId]->SetValue(event.GetInt() * -1); } - + g_RecordingInput.UpdateAnalog(controllerPort, PadDataAnalogVector(sliderId), event.GetInt() + 127); } } @@ -214,7 +229,7 @@ void VirtualPad::OnAnalogValChange(wxSpinEvent & event) { wxSpinCtrl* updatedSpinner = (wxSpinCtrl*)event.GetEventObject(); int spinnerId = -1; - for (int i = 0; i < std::size(analogVals); i++) + for (int i = 0; i < analogValsLength; i++) { if (updatedSpinner == analogVals[i]) { diff --git a/pcsx2/Recording/VirtualPad.h b/pcsx2/Recording/VirtualPad.h index 88f6dab11f..e8d99ff8e3 100644 --- a/pcsx2/Recording/VirtualPad.h +++ b/pcsx2/Recording/VirtualPad.h @@ -1,3 +1,18 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2019 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + #pragma once #include diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index 22ef7e6f40..193e632439 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -740,7 +740,7 @@ EXPORT_C_(uint32) GSmakeSnapshot(char* path) { std::string s{path}; - if (!s.empty() && s[s.length() - 1] != DIRECTORY_SEPARATOR) + if(!s.empty() && s[s.length() - 1] != DIRECTORY_SEPARATOR) { s = s + DIRECTORY_SEPARATOR; } diff --git a/plugins/GSdx/Renderers/Common/GSRenderer.cpp b/plugins/GSdx/Renderers/Common/GSRenderer.cpp index 8aac81f1a0..7d6a90fe53 100644 --- a/plugins/GSdx/Renderers/Common/GSRenderer.cpp +++ b/plugins/GSdx/Renderers/Common/GSRenderer.cpp @@ -499,7 +499,7 @@ void GSRenderer::VSync(int field) bool GSRenderer::MakeSnapshot(const std::string& path) { - if (m_snapshot.empty()) + if(m_snapshot.empty()) { time_t cur_time = time(nullptr); static time_t prev_snap;