summaryrefslogtreecommitdiffstats
path: root/src/skel/win/win.cpp
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2019-10-27 04:17:30 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2019-10-27 04:17:30 +0100
commit537aaca5c200cb61928674303f7a24e3af29ad54 (patch)
tree6107f1e30d2392fb11df36d4902605810b4a6998 /src/skel/win/win.cpp
parentCGame::FinalShutdown (diff)
downloadre3-537aaca5c200cb61928674303f7a24e3af29ad54.tar
re3-537aaca5c200cb61928674303f7a24e3af29ad54.tar.gz
re3-537aaca5c200cb61928674303f7a24e3af29ad54.tar.bz2
re3-537aaca5c200cb61928674303f7a24e3af29ad54.tar.lz
re3-537aaca5c200cb61928674303f7a24e3af29ad54.tar.xz
re3-537aaca5c200cb61928674303f7a24e3af29ad54.tar.zst
re3-537aaca5c200cb61928674303f7a24e3af29ad54.zip
Diffstat (limited to 'src/skel/win/win.cpp')
-rw-r--r--src/skel/win/win.cpp40
1 files changed, 6 insertions, 34 deletions
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index fc82e51e..9d74b68b 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -115,38 +115,11 @@ DWORD _dwMemAvailVideo;
DWORD &_dwOperatingSystemVersion = *(DWORD*)0x70F290;
RwUInt32 &gGameState = *(RwUInt32*)0x8F5838;
-
-enum eJoypadState
-{
- JOYPAD_UNUSED,
- JOYPAD_ATTACHED,
-};
-
-struct tJoy
-{
- eJoypadState m_State;
- bool m_bInitialised;
- bool m_bHasAxisZ;
- bool m_bHasAxisR;
- char _pad0;
- int32 m_nVendorID;
- int32 m_nProductID;
-};
-
-class CJoySticks
-{
-public:
- tJoy m_aJoys[2];
-
- CJoySticks();
- void ClearJoyInfo(int joyID);
-};
-
-static CJoySticks AllValidWinJoys;
+CJoySticks AllValidWinJoys;
CJoySticks::CJoySticks()
{
- for (int i = 0; i < _TODOCONST(2); i++)
+ for (int i = 0; i < MAX_JOYSTICKS; i++)
{
ClearJoyInfo(i);
}
@@ -154,7 +127,6 @@ CJoySticks::CJoySticks()
void CJoySticks::ClearJoyInfo(int joyID)
{
-
m_aJoys[joyID].m_State = JOYPAD_UNUSED;
m_aJoys[joyID].m_bInitialised = false;
m_aJoys[joyID].m_bHasAxisZ = false;
@@ -641,14 +613,14 @@ psInitialise(void)
GetVersionEx(&verInfo);
- _dwOperatingSystemVersion = 0;
+ _dwOperatingSystemVersion = OS_WIN95;
if ( verInfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
{
if ( verInfo.dwMajorVersion == 4 )
{
debug("Operating System is WinNT\n");
- _dwOperatingSystemVersion = oS_WINNT;
+ _dwOperatingSystemVersion = OS_WINNT;
}
else if ( verInfo.dwMajorVersion == 5 )
{
@@ -2337,12 +2309,12 @@ HRESULT CapturePad(RwInt32 padID)
if( FAILED( hr = (*pPad)->GetDeviceState( sizeof(DIJOYSTATE2), &js ) ) )
return hr; // The device should have been acquired during the Poll()
- if ( ControlsManager.firstCapture == true )
+ if ( ControlsManager.m_bFirstCapture == true )
{
memcpy(&ControlsManager.m_OldState, &js, sizeof(DIJOYSTATE2));
memcpy(&ControlsManager.m_NewState, &js, sizeof(DIJOYSTATE2));
- ControlsManager.firstCapture = false;
+ ControlsManager.m_bFirstCapture = false;
}
else
{