mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Add bounds check.
Some checks failed
Build Android / build_android (apk) (push) Has been cancelled
Build Android / build_android (libretro) (push) Has been cancelled
Build iOS / build_ios (push) Has been cancelled
Build JavaScript / build_js (push) Has been cancelled
Build Linux / build_linux (push) Has been cancelled
Build Linux ARM32 / build_linux_arm32 (push) Has been cancelled
Build Linux ARM64 / build_linux_arm64 (push) Has been cancelled
Build macOS / build_macos (push) Has been cancelled
Build Windows / build_windows (x86_32, Visual Studio 16 2019, installer32.nsi, win32_msvc2019, Win32) (push) Has been cancelled
Build Windows / build_windows (x86_64, Visual Studio 16 2019, installer64.nsi, win64_msvc2019_64, x64) (push) Has been cancelled
Build Windows Psf / build_windows_psf (off, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Has been cancelled
Build Windows Psf / build_windows_psf (on, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Has been cancelled
Check Format / run_clangformat (push) Has been cancelled
Some checks failed
Build Android / build_android (apk) (push) Has been cancelled
Build Android / build_android (libretro) (push) Has been cancelled
Build iOS / build_ios (push) Has been cancelled
Build JavaScript / build_js (push) Has been cancelled
Build Linux / build_linux (push) Has been cancelled
Build Linux ARM32 / build_linux_arm32 (push) Has been cancelled
Build Linux ARM64 / build_linux_arm64 (push) Has been cancelled
Build macOS / build_macos (push) Has been cancelled
Build Windows / build_windows (x86_32, Visual Studio 16 2019, installer32.nsi, win32_msvc2019, Win32) (push) Has been cancelled
Build Windows / build_windows (x86_64, Visual Studio 16 2019, installer64.nsi, win64_msvc2019_64, x64) (push) Has been cancelled
Build Windows Psf / build_windows_psf (off, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Has been cancelled
Build Windows Psf / build_windows_psf (on, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Has been cancelled
Check Format / run_clangformat (push) Has been cancelled
This commit is contained in:
parent
ba3a33dda2
commit
329396faed
2 changed files with 4 additions and 1 deletions
|
@ -667,6 +667,8 @@ void CSio2::DisassembleWrite(uint32 address, uint32 value)
|
|||
|
||||
void CSio2::GetVibration(unsigned int padId, uint8& largeMotor, uint8& smallMotor)
|
||||
{
|
||||
if(padId >= MAX_PADS) return;
|
||||
|
||||
auto& padState = m_padState[padId];
|
||||
largeMotor = padState.largeMotor;
|
||||
smallMotor = padState.smallMotor;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "Iop_Intc.h"
|
||||
#include "../PadInterface.h"
|
||||
#include <deque>
|
||||
#include <array>
|
||||
|
||||
namespace Iop
|
||||
{
|
||||
|
@ -97,6 +98,6 @@ namespace Iop
|
|||
ByteBufferType m_inputBuffer;
|
||||
ByteBufferType m_outputBuffer;
|
||||
|
||||
PADSTATE m_padState[MAX_PADS];
|
||||
std::array<PADSTATE, MAX_PADS> m_padState;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue