mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
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
This commit is contained in:
@ -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] )
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user