diff options
| author | hrydgard <hrydgard@gmail.com> | 2010-06-03 18:05:08 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2010-06-03 18:05:08 +0000 |
| commit | a3c96ac42c4c2ce4a4cf2f5ca09a5ae9dd4bd303 (patch) | |
| tree | da7ca1f64fce704934d581c82a9533fe38b103f1 /Source/Core/InputCommon/Src/ControllerInterface/DirectInput | |
| parent | 3236aa9e73cf6d0bc798cce6f5224cff40eb6955 (diff) | |
Warp back to 5578. Sorry for the lost changes, please re-apply. Reason: 5579 is a complete disaster.
Not only does it change tons of files to switch to a new and non-working (it doesn't parse my ini files, at least) ini parser, it also reshuffles a lot of code and removes a plugin. The latter part is fine, but doing these two major switches in one revision, one of which is broken, is completely unacceptable. I said to merge tiny changes, not massive reworkings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5589 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DirectInput')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp | 7 | ||||
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.h | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp index 98e199c24f..071a233887 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp @@ -2,7 +2,6 @@ #ifdef CIFACE_USE_DIRECTINPUT_KBM -#include <Timer.h> #include "DirectInputKeyboardMouse.h" // TODO: maybe add a ClearInputState function to this device @@ -96,7 +95,7 @@ KeyboardMouse::KeyboardMouse( const LPDIRECTINPUTDEVICE8 kb_device, const LPDIRE : m_kb_device(kb_device) , m_mo_device(mo_device) { - m_last_update = Common::Timer::GetLocalTimeSinceJan1970(); + m_last_update = wxGetLocalTimeMillis(); ZeroMemory( &m_state_in, sizeof(m_state_in) ); ZeroMemory( m_state_out, sizeof(m_state_out) ); @@ -134,7 +133,7 @@ bool KeyboardMouse::UpdateInput() DIMOUSESTATE2 tmp_mouse; // if mouse position hasn't been updated in a short while, skip a dev state - u64 cur_time = Common::Timer::GetLocalTimeSinceJan1970(); + wxLongLong cur_time = wxGetLocalTimeMillis(); if ( cur_time - m_last_update > DROP_INPUT_TIME ) { // set axes to zero @@ -179,7 +178,7 @@ bool KeyboardMouse::UpdateOutput() { bool want_on = false; if ( m_state_out[i] ) - want_on = m_state_out[i] > Common::Timer::GetLocalTimeSinceJan1970() % 255 ; // light should flash when output is 0.5 + want_on = m_state_out[i] > wxGetLocalTimeMillis() % 255 ; // light should flash when output is 0.5 // lights are set to their original state when output is zero if ( want_on ^ m_current_state_out[i] ) diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.h b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.h index e57e8d7e97..6af5fb10d0 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.h @@ -9,6 +9,8 @@ #include <Windows.h> #include <dinput.h> +#include <wx/stopwatch.h> +#include <wx/utils.h> namespace ciface { @@ -111,7 +113,7 @@ private: const LPDIRECTINPUTDEVICE8 m_kb_device; const LPDIRECTINPUTDEVICE8 m_mo_device; - u64 m_last_update; + wxLongLong m_last_update; State m_state_in; unsigned char m_state_out[3]; // NUM CAPS SCROLL bool m_current_state_out[3]; // NUM CAPS SCROLL |
