Decouple <vector>
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#include "VersionHelpers.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
||||
static HANDLE g_hInstanceMutex;
|
||||
static bool g_bIsMultipleInstance = false;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "RageFileManager.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
// for timeGetTime
|
||||
#include <windows.h>
|
||||
|
||||
+14
-11
@@ -8,6 +8,9 @@
|
||||
#include "RageLog.h"
|
||||
#include "RageThreads.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
#if !defined(SMPACKAGE)
|
||||
static Preference<RString> g_sIgnoredDialogs( "IgnoredDialogs", "" );
|
||||
#endif
|
||||
@@ -99,7 +102,7 @@ void Dialog::IgnoreMessage( RString sID )
|
||||
if( PREFSMAN == nullptr )
|
||||
{
|
||||
if( sID != "" && LOG )
|
||||
LOG->Warn( "Dialog: message \"%s\" set ID too early for ignorable messages", sID.c_str() );
|
||||
LOG->Warn( "Dialog: message \"%s\" set ID too early for ignorable messages", sID.c_str() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -128,9 +131,9 @@ void Dialog::Error( RString sMessage, RString sID )
|
||||
return;
|
||||
|
||||
RageThread::SetIsShowingDialog( true );
|
||||
|
||||
|
||||
g_pImpl->Error( sMessage, sID );
|
||||
|
||||
|
||||
RageThread::SetIsShowingDialog( false );
|
||||
}
|
||||
|
||||
@@ -150,13 +153,13 @@ void Dialog::OK( RString sMessage, RString sID )
|
||||
return;
|
||||
|
||||
RageThread::SetIsShowingDialog( true );
|
||||
|
||||
|
||||
// only show Dialog if windowed
|
||||
if( DialogsEnabled() )
|
||||
g_pImpl->OK( sMessage, sID ); // call derived version
|
||||
else
|
||||
g_NullDriver.OK( sMessage, sID );
|
||||
|
||||
|
||||
RageThread::SetIsShowingDialog( false );
|
||||
}
|
||||
|
||||
@@ -195,14 +198,14 @@ Dialog::Result Dialog::AbortRetryIgnore( RString sMessage, RString sID )
|
||||
return g_NullDriver.AbortRetryIgnore( sMessage, sID );
|
||||
|
||||
RageThread::SetIsShowingDialog( true );
|
||||
|
||||
|
||||
// only show Dialog if windowed
|
||||
Dialog::Result ret;
|
||||
if( DialogsEnabled() )
|
||||
ret = g_pImpl->AbortRetryIgnore( sMessage, sID ); // call derived version
|
||||
else
|
||||
ret = g_NullDriver.AbortRetryIgnore( sMessage, sID );
|
||||
|
||||
|
||||
RageThread::SetIsShowingDialog( false );
|
||||
|
||||
return ret;
|
||||
@@ -226,7 +229,7 @@ Dialog::Result Dialog::AbortRetry( RString sMessage, RString sID )
|
||||
ret = g_pImpl->AbortRetry( sMessage, sID ); // call derived version
|
||||
else
|
||||
ret = g_NullDriver.AbortRetry( sMessage, sID );
|
||||
|
||||
|
||||
RageThread::SetIsShowingDialog( false );
|
||||
|
||||
return ret;
|
||||
@@ -250,7 +253,7 @@ Dialog::Result Dialog::YesNo( RString sMessage, RString sID )
|
||||
ret = g_pImpl->YesNo( sMessage, sID ); // call derived version
|
||||
else
|
||||
ret = g_NullDriver.YesNo( sMessage, sID );
|
||||
|
||||
|
||||
RageThread::SetIsShowingDialog( false );
|
||||
|
||||
return ret;
|
||||
@@ -259,7 +262,7 @@ Dialog::Result Dialog::YesNo( RString sMessage, RString sID )
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard, Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -269,7 +272,7 @@ Dialog::Result Dialog::YesNo( RString sMessage, RString sID )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "global.h"
|
||||
#include "DialogDriver.h"
|
||||
|
||||
#include "RageLog.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
std::map<istring, CreateDialogDriverFn> *RegisterDialogDriver::g_pRegistrees;
|
||||
RegisterDialogDriver::RegisterDialogDriver( const istring &sName, CreateDialogDriverFn pfn )
|
||||
{
|
||||
@@ -47,7 +49,7 @@ DialogDriver *DialogDriver::Create()
|
||||
/*
|
||||
* (c) 2002-2006 Glenn Maynard, Steve Checkoway
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -57,7 +59,7 @@ DialogDriver *DialogDriver::Create()
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
#include "RageThreads.h"
|
||||
#include "ProductInfo.h"
|
||||
#include "InputFilter.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
|
||||
REGISTER_DIALOG_DRIVER_CLASS( MacOSX );
|
||||
|
||||
static CFOptionFlags ShowAlert( CFOptionFlags flags, const RString& sMessage, CFStringRef OK,
|
||||
@@ -146,7 +150,7 @@ Dialog::Result DialogDriver_MacOSX::YesNo( RString sMessage, RString sID )
|
||||
/*
|
||||
* (c) 2003-2006 Steve Checkoway
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -156,7 +160,7 @@ Dialog::Result DialogDriver_MacOSX::YesNo( RString sMessage, RString sID )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "InputHandler_MonkeyKeyboard.h"
|
||||
//#include "InputHandler_NSEvent.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
void InputHandler::UpdateTimer()
|
||||
{
|
||||
@@ -58,15 +60,15 @@ wchar_t InputHandler::DeviceButtonToChar( DeviceButton button, bool bUseCurrentK
|
||||
case KEY_KP_EQUAL: c = L'='; break;
|
||||
}
|
||||
|
||||
// Handle some default US keyboard modifiers for derived InputHandlers that
|
||||
// Handle some default US keyboard modifiers for derived InputHandlers that
|
||||
// don't implement DeviceButtonToChar.
|
||||
if( bUseCurrentKeyModifiers )
|
||||
{
|
||||
bool bHoldingShift =
|
||||
bool bHoldingShift =
|
||||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT)) ||
|
||||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_RSHIFT));
|
||||
|
||||
bool bHoldingCtrl =
|
||||
bool bHoldingCtrl =
|
||||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL)) ||
|
||||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL));
|
||||
|
||||
@@ -103,7 +105,7 @@ wchar_t InputHandler::DeviceButtonToChar( DeviceButton button, bool bUseCurrentK
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -176,10 +178,10 @@ void InputHandler::Create( const RString &drivers_, std::vector<InputHandler *>
|
||||
const RString drivers = drivers_.empty()? RString(DEFAULT_INPUT_DRIVER_LIST):drivers_;
|
||||
std::vector<RString> DriversToTry;
|
||||
split( drivers, ",", DriversToTry, true );
|
||||
|
||||
|
||||
if( DriversToTry.empty() )
|
||||
RageException::Throw( "%s", INPUT_HANDLERS_EMPTY.GetValue().c_str() );
|
||||
|
||||
|
||||
for (RString const &s : DriversToTry)
|
||||
{
|
||||
RageDriver *pDriver = InputHandler::m_pDriverList.Create( s );
|
||||
@@ -203,7 +205,7 @@ void InputHandler::Create( const RString &drivers_, std::vector<InputHandler *>
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -213,7 +215,7 @@ void InputHandler::Create( const RString &drivers_, std::vector<InputHandler *>
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/* This is a simple class to handle special input devices. Update() will be
|
||||
* called during the input update; the derived class should send appropriate
|
||||
* events to InputHandler.
|
||||
* events to InputHandler.
|
||||
* Note that, if the underlying device is capable of it, you're free to start
|
||||
* a blocking thread; just store inputs in your class and send them off in a
|
||||
* batch on the next Update. This gets much more accurate timestamps; we get
|
||||
@@ -18,6 +18,10 @@
|
||||
* if it becomes needed.) */
|
||||
#include "RageInputDevice.h" // for InputDevice
|
||||
#include "arch/RageDriver.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
/** @brief A class designed to handle special input devices. */
|
||||
class InputHandler: public RageDriver
|
||||
{
|
||||
@@ -46,7 +50,7 @@ public:
|
||||
|
||||
protected:
|
||||
/* Convenience function: Call this to queue a received event.
|
||||
* This may be called in a thread.
|
||||
* This may be called in a thread.
|
||||
*
|
||||
* Important detail: If the timestamp, di.ts, is zero, then it is assumed that
|
||||
* this is not a threaded event handler. In that case, input is being polled,
|
||||
@@ -55,7 +59,7 @@ protected:
|
||||
* the midpoint since the last update, which will smooth out the error.
|
||||
*
|
||||
* Note that timestamps are set to the current time by default, so for this
|
||||
* to happen, you need to explicitly call di.ts.SetZero().
|
||||
* to happen, you need to explicitly call di.ts.SetZero().
|
||||
*
|
||||
* If the timestamp is set, it'll be left alone. */
|
||||
void ButtonPressed( DeviceInput di );
|
||||
@@ -80,7 +84,7 @@ private:
|
||||
* @author Glenn Maynard (c) 2003-2004
|
||||
* @section LICENSE
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -90,7 +94,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <WbemIdl.h>
|
||||
#include <OleAuto.h>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
// this may not be defined if we are using an older Windows SDK. (for instance, toolsetversion v140_xp does not define it)
|
||||
// the number was taken from the documentation
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include "InputHandler.h"
|
||||
#include "RageThreads.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
struct DIDevice;
|
||||
struct XIDevice;
|
||||
class InputHandler_DInput: public InputHandler
|
||||
@@ -42,7 +45,7 @@ private:
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -52,7 +55,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "InputFilter.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
extern LPDIRECTINPUT8 g_dinput;
|
||||
@@ -67,7 +69,7 @@ struct XIDevice
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -77,7 +79,7 @@ struct XIDevice
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#include "LinuxInputManager.h"
|
||||
#include "GamePreferences.h" //needed for Axis Fix
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -13,8 +17,6 @@
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstdint>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "InputHandler.h"
|
||||
#include "RageThreads.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InputHandler_Linux_Event: public InputHandler
|
||||
{
|
||||
@@ -33,7 +35,7 @@ private:
|
||||
/*
|
||||
* (c) 2003-2008 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -43,7 +45,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#include "LinuxInputManager.h"
|
||||
#include "RageInputDevice.h" // NUM_JOYSTICKS
|
||||
|
||||
#include <cerrno>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -12,23 +16,21 @@
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <linux/joystick.h>
|
||||
|
||||
#include <set>
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS2( LinuxJoystick, Linux_Joystick );
|
||||
|
||||
InputHandler_Linux_Joystick::InputHandler_Linux_Joystick()
|
||||
{
|
||||
m_bDevicesChanged = false;
|
||||
|
||||
|
||||
LOG->Trace( "InputHandler_Linux_Joystick::InputHandler_Linux_Joystick" );
|
||||
for(int i = 0; i < NUM_JOYSTICKS; ++i)
|
||||
fds[i] = -1;
|
||||
|
||||
|
||||
m_iLastFd = 0;
|
||||
|
||||
if( LINUXINPUT == nullptr ) LINUXINPUT = new LinuxInputManager;
|
||||
@@ -70,7 +72,7 @@ bool InputHandler_Linux_Joystick::TryDevice(RString dev)
|
||||
|
||||
if( !S_ISCHR( st.st_mode ) )
|
||||
{ LOG->Warn( "LinuxJoystick: Ignoring %s: not a character device", dev.c_str() ); return false; }
|
||||
|
||||
|
||||
bool ret = false;
|
||||
bool hotplug = false;
|
||||
if( m_InputThread.IsCreated() ) { StopThread(); hotplug = true; }
|
||||
@@ -95,7 +97,7 @@ bool InputHandler_Linux_Joystick::TryDevice(RString dev)
|
||||
else LOG->Warn("LinuxJoystick: Failed to open %s: %s", dev.c_str(), strerror(errno) );
|
||||
}
|
||||
if( hotplug ) StartThread();
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -199,7 +201,7 @@ void InputHandler_Linux_Joystick::GetDevicesAndDescriptions( std::vector<InputDe
|
||||
// as part of the constructor. This isn't called until all InputHandlers have been constructed,
|
||||
// and is (hopefully) in the same thread as TryDevice... so doublecheck our thread now.
|
||||
if( fds[0] != -1 && !m_InputThread.IsCreated() ) StartThread();
|
||||
|
||||
|
||||
for(int i = 0; i < NUM_JOYSTICKS; ++i)
|
||||
{
|
||||
if (fds[i] < 0)
|
||||
@@ -214,7 +216,7 @@ void InputHandler_Linux_Joystick::GetDevicesAndDescriptions( std::vector<InputDe
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* (c) 2013 Ben "root" Anderson
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -224,7 +226,7 @@ void InputHandler_Linux_Joystick::GetDevicesAndDescriptions( std::vector<InputDe
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "InputHandler.h"
|
||||
#include "RageThreads.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InputHandler_Linux_Joystick: public InputHandler
|
||||
{
|
||||
@@ -33,7 +35,7 @@ private:
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -43,7 +45,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -3,8 +3,12 @@
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <cerrno>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -12,11 +16,9 @@
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <set>
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS2( PIUIO, Linux_PIUIO );
|
||||
|
||||
@@ -143,7 +145,7 @@ void InputHandler_Linux_PIUIO::GetDevicesAndDescriptions( std::vector<InputDevic
|
||||
*
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -153,7 +155,7 @@ void InputHandler_Linux_PIUIO::GetDevicesAndDescriptions( std::vector<InputDevic
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "InputHandler.h"
|
||||
#include "RageThreads.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InputHandler_Linux_PIUIO: public InputHandler
|
||||
{
|
||||
@@ -30,7 +32,7 @@ private:
|
||||
*
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -40,7 +42,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include "archutils/Darwin/JoystickDevice.h"
|
||||
#include "archutils/Darwin/PumpDevice.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <IOKit/IOMessage.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
@@ -243,10 +245,10 @@ InputHandler_MacOSX_HID::InputHandler_MacOSX_HID() : m_Sem( "Input thread starte
|
||||
// Add devices.
|
||||
LOG->Trace( "Finding keyboards" );
|
||||
AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Keyboard, id );
|
||||
|
||||
|
||||
LOG->Trace( "Finding mice" );
|
||||
AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Mouse, id );
|
||||
|
||||
|
||||
LOG->Trace( "Finding joysticks" );
|
||||
id = DEVICE_JOY1;
|
||||
AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick, id );
|
||||
@@ -377,21 +379,21 @@ static wchar_t KeyCodeToChar(CGKeyCode keyCode, unsigned int modifierFlags)
|
||||
TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
|
||||
CFDataRef uchr = (CFDataRef)TISGetInputSourceProperty(currentKeyboard, kTISPropertyUnicodeKeyLayoutData);
|
||||
const UCKeyboardLayout *keyboardLayout = uchr ? (const UCKeyboardLayout*)CFDataGetBytePtr(uchr) : nullptr;
|
||||
|
||||
|
||||
if( keyboardLayout )
|
||||
{
|
||||
UInt32 deadKeyState = 0;
|
||||
constexpr UniCharCount maxStringLength = 255;
|
||||
UniCharCount actualStringLength = 0;
|
||||
UniChar unicodeString[maxStringLength];
|
||||
|
||||
|
||||
OSStatus status = UCKeyTranslate(keyboardLayout,
|
||||
keyCode, kUCKeyActionDown, modifierFlags,
|
||||
LMGetKbdType(), 0,
|
||||
&deadKeyState,
|
||||
maxStringLength,
|
||||
&actualStringLength, unicodeString);
|
||||
|
||||
|
||||
if( status != noErr )
|
||||
{
|
||||
NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:status userInfo:nil];
|
||||
@@ -465,7 +467,7 @@ wchar_t InputHandler_MacOSX_HID::DeviceButtonToChar( DeviceButton button, bool b
|
||||
/*
|
||||
* (c) 2005, 2006 Steve Checkoway
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -475,7 +477,7 @@ wchar_t InputHandler_MacOSX_HID::DeviceButtonToChar( DeviceButton button, bool b
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "RageUtil.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
InputHandler_MonkeyKeyboard::InputHandler_MonkeyKeyboard()
|
||||
{
|
||||
@@ -70,7 +72,7 @@ void InputHandler_MonkeyKeyboard::Update()
|
||||
InputHandler::UpdateTimer();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
float fSecsAgo = m_timerPressButton.Ago();
|
||||
|
||||
if( fSecsAgo > 0.5 )
|
||||
@@ -95,7 +97,7 @@ void InputHandler_MonkeyKeyboard::Update()
|
||||
/*
|
||||
* (c) 2002-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -105,7 +107,7 @@ void InputHandler_MonkeyKeyboard::Update()
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#include "RageTimer.h"
|
||||
#include "RageInputDevice.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InputHandler_MonkeyKeyboard: public InputHandler
|
||||
{
|
||||
public:
|
||||
@@ -23,7 +26,7 @@ private:
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -33,7 +36,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -10,14 +10,16 @@
|
||||
|
||||
#include "InputHandler.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InputHandler_NSEvent : public InputHandler
|
||||
{
|
||||
public:
|
||||
InputHandler_NSEvent();
|
||||
~InputHandler_NSEvent();
|
||||
|
||||
|
||||
void GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevicesOut );
|
||||
};
|
||||
|
||||
|
||||
@@ -7,9 +7,12 @@
|
||||
|
||||
#include "InputHandler_NSEvent.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <Carbon/Carbon.h>
|
||||
|
||||
|
||||
DeviceButton NSKeyCodeMap[0x100];
|
||||
|
||||
float DownOrUp(bool down)
|
||||
@@ -45,7 +48,7 @@ void InitKeyCodeMap()
|
||||
NSKeyCodeMap[kVK_ANSI_X] = KEY_Cx;
|
||||
NSKeyCodeMap[kVK_ANSI_Y] = KEY_Cy;
|
||||
NSKeyCodeMap[kVK_ANSI_Z] = KEY_Cz;
|
||||
|
||||
|
||||
NSKeyCodeMap[kVK_ANSI_0] = KEY_C0;
|
||||
NSKeyCodeMap[kVK_ANSI_1] = KEY_C1;
|
||||
NSKeyCodeMap[kVK_ANSI_2] = KEY_C2;
|
||||
@@ -56,7 +59,7 @@ void InitKeyCodeMap()
|
||||
NSKeyCodeMap[kVK_ANSI_7] = KEY_C7;
|
||||
NSKeyCodeMap[kVK_ANSI_8] = KEY_C8;
|
||||
NSKeyCodeMap[kVK_ANSI_9] = KEY_C9;
|
||||
|
||||
|
||||
NSKeyCodeMap[kVK_ANSI_Keypad0] = KEY_KP_C0;
|
||||
NSKeyCodeMap[kVK_ANSI_Keypad1] = KEY_KP_C1;
|
||||
NSKeyCodeMap[kVK_ANSI_Keypad2] = KEY_KP_C2;
|
||||
@@ -67,7 +70,7 @@ void InitKeyCodeMap()
|
||||
NSKeyCodeMap[kVK_ANSI_Keypad7] = KEY_KP_C7;
|
||||
NSKeyCodeMap[kVK_ANSI_Keypad8] = KEY_KP_C8;
|
||||
NSKeyCodeMap[kVK_ANSI_Keypad9] = KEY_KP_C9;
|
||||
|
||||
|
||||
NSKeyCodeMap[kVK_ANSI_KeypadDivide] = KEY_KP_SLASH;
|
||||
NSKeyCodeMap[kVK_ANSI_KeypadMultiply] = KEY_KP_ASTERISK;
|
||||
NSKeyCodeMap[kVK_ANSI_KeypadEnter] = KEY_KP_ENTER;
|
||||
@@ -75,7 +78,7 @@ void InitKeyCodeMap()
|
||||
NSKeyCodeMap[kVK_ANSI_KeypadMinus] = KEY_KP_HYPHEN;
|
||||
NSKeyCodeMap[kVK_ANSI_KeypadPlus] = KEY_KP_PLUS;
|
||||
NSKeyCodeMap[kVK_ANSI_KeypadDecimal] = KEY_KP_PERIOD;
|
||||
|
||||
|
||||
NSKeyCodeMap[kVK_Home] = KEY_HOME;
|
||||
NSKeyCodeMap[kVK_End] = KEY_END;
|
||||
NSKeyCodeMap[kVK_PageDown] = KEY_PGDN;
|
||||
@@ -97,7 +100,7 @@ void InitKeyCodeMap()
|
||||
NSKeyCodeMap[kVK_F14] = KEY_F14;
|
||||
NSKeyCodeMap[kVK_F15] = KEY_F15;
|
||||
NSKeyCodeMap[kVK_F16] = KEY_F16;
|
||||
|
||||
|
||||
NSKeyCodeMap[kVK_ANSI_Quote] = KEY_QUOTE;
|
||||
NSKeyCodeMap[kVK_ANSI_Backslash] = KEY_BACKSLASH;
|
||||
NSKeyCodeMap[kVK_CapsLock] = KEY_CAPSLOCK;
|
||||
@@ -105,7 +108,7 @@ void InitKeyCodeMap()
|
||||
NSKeyCodeMap[kVK_ForwardDelete] = KEY_DEL;
|
||||
NSKeyCodeMap[kVK_Delete] = KEY_BACK;
|
||||
NSKeyCodeMap[kVK_ANSI_Equal] = KEY_EQUAL;
|
||||
|
||||
|
||||
NSKeyCodeMap[kVK_Escape] = KEY_ESC;
|
||||
NSKeyCodeMap[kVK_ANSI_LeftBracket] = KEY_LBRACKET;
|
||||
NSKeyCodeMap[kVK_ANSI_Minus] = KEY_HYPHEN;
|
||||
@@ -115,7 +118,7 @@ void InitKeyCodeMap()
|
||||
NSKeyCodeMap[kVK_ANSI_Semicolon] = KEY_SEMICOLON;
|
||||
NSKeyCodeMap[kVK_Space] = KEY_SPACE;
|
||||
NSKeyCodeMap[kVK_Tab] = KEY_TAB;
|
||||
|
||||
|
||||
NSKeyCodeMap[kVK_Command] = KEY_LMETA;
|
||||
NSKeyCodeMap[kVK_RightCommand] = KEY_RMETA;
|
||||
NSKeyCodeMap[kVK_Control] = KEY_LCTRL;
|
||||
@@ -125,7 +128,7 @@ void InitKeyCodeMap()
|
||||
NSKeyCodeMap[kVK_RightOption] = KEY_RALT;
|
||||
NSKeyCodeMap[kVK_Shift] = KEY_LSHIFT;
|
||||
NSKeyCodeMap[kVK_RightShift] = KEY_RSHIFT;
|
||||
|
||||
|
||||
NSKeyCodeMap[kVK_DownArrow] = KEY_DOWN;
|
||||
NSKeyCodeMap[kVK_LeftArrow] = KEY_LEFT;
|
||||
NSKeyCodeMap[kVK_RightArrow] = KEY_RIGHT;
|
||||
@@ -146,10 +149,10 @@ void InitKeyCodeMap()
|
||||
InputHandler_NSEvent::InputHandler_NSEvent()
|
||||
{
|
||||
InitKeyCodeMap();
|
||||
|
||||
|
||||
[NSEvent addLocalMonitorForEventsMatchingMask:(NSEventMaskKeyDown | NSEventMaskKeyUp | NSEventMaskFlagsChanged) handler:^(NSEvent* e) {
|
||||
unsigned short keyCode = [e keyCode];
|
||||
|
||||
|
||||
if([e type] == NSEventTypeKeyUp)
|
||||
{
|
||||
ButtonPressed(DeviceInput(DEVICE_KEYBOARD, NSKeyCodeMap[keyCode], 1));
|
||||
@@ -184,7 +187,7 @@ InputHandler_NSEvent::InputHandler_NSEvent()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return e;
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
// In so many words, ceil(n/6).
|
||||
#define NUMBER_OF_SEXTETS_FOR_BIT_COUNT(n) (((n) + 5) / 6)
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
#define INPUT_HANDLER_SEXTETSTREAM
|
||||
|
||||
#include "InputHandler.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InputHandler_SextetStream: public InputHandler
|
||||
{
|
||||
@@ -33,7 +36,7 @@ public:
|
||||
// passed to fopen(), not a RageFile ctor, so specify the file to be
|
||||
// opened on the actual filesystem instead of the mapped filesystem. (I
|
||||
// couldn't get RageFile to work here, possibly because I haven't
|
||||
// determined how to disable buffering on an input file.)
|
||||
// determined how to disable buffering on an input file.)
|
||||
InputHandler_SextetStreamFromFile();
|
||||
};
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "InputHandler_Win32_MIDI.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include "InputHandler.h"
|
||||
#include "RageInputDevice.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InputHandler_Win32_MIDI: public InputHandler
|
||||
{
|
||||
public:
|
||||
@@ -24,7 +27,7 @@ private:
|
||||
/*
|
||||
* (c) 2002-2005 Charles Lohr, Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -34,7 +37,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -13,6 +13,9 @@ extern "C" {
|
||||
#include "archutils/Win32/ddk/hidsdi.h"
|
||||
}
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS2( Para, Win32_Para );
|
||||
|
||||
static void InitHack( HANDLE h )
|
||||
@@ -47,7 +50,7 @@ void InputHandler_Win32_Para::GetDevicesAndDescriptions(std::vector<InputDeviceI
|
||||
/*
|
||||
* (c) 2002-2004 Chris Danford, Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -57,7 +60,7 @@ void InputHandler_Win32_Para::GetDevicesAndDescriptions(std::vector<InputDeviceI
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
#include "InputHandler.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InputHandler_Win32_Para: public InputHandler
|
||||
{
|
||||
public:
|
||||
@@ -17,7 +20,7 @@ public:
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -27,7 +30,7 @@ public:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -8,15 +8,18 @@
|
||||
#include "archutils/Win32/ErrorStrings.h"
|
||||
#include "archutils/Win32/USB.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS2( Pump, Win32_Pump );
|
||||
|
||||
InputHandler_Win32_Pump::InputHandler_Win32_Pump()
|
||||
{
|
||||
m_bShutdown = false;
|
||||
const int pump_usb_vid = 0x0d2f;
|
||||
const int pump_usb_pids[2] = {
|
||||
0x0001 /* older model */,
|
||||
0x0003 /* shipped with Exceed */
|
||||
const int pump_usb_pids[2] = {
|
||||
0x0001 /* older model */,
|
||||
0x0003 /* shipped with Exceed */
|
||||
};
|
||||
|
||||
m_pDevice = new USBDevice[NUM_PUMPS];
|
||||
@@ -71,7 +74,7 @@ void InputHandler_Win32_Pump::HandleInput( int iDevice, int iEvent )
|
||||
for( int iButton = 0; iButton < ARRAYLEN(bits); ++iButton )
|
||||
{
|
||||
DeviceInput di( id, enum_add2(JOY_BUTTON_1, iButton), !(iEvent & bits[iButton]) );
|
||||
|
||||
|
||||
/* If we're in a thread, our timestamp is accurate. */
|
||||
if( InputThread.IsCreated() )
|
||||
di.ts.Touch();
|
||||
@@ -168,7 +171,7 @@ void InputHandler_Win32_Pump::Update()
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -178,7 +181,7 @@ void InputHandler_Win32_Pump::Update()
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include "InputHandler.h"
|
||||
#include "RageThreads.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class USBDevice;
|
||||
class InputHandler_Win32_Pump: public InputHandler
|
||||
{
|
||||
@@ -29,7 +32,7 @@ private:
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -39,7 +42,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "InputHandler_Win32_RTIO.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "RageLog.h"
|
||||
#include "RageInputDevice.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
|
||||
// The coin counter won't accept an increment command immediately after acking
|
||||
// an older increment command. This delay is the minimum amount of time to wait
|
||||
// between receiving an ack for an increment command and sending a new
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "PrefsManager.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "arch/Lights/LightsDriver_Export.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
||||
static bool _ddriodll_loaded = false;
|
||||
|
||||
|
||||
@@ -6,9 +6,12 @@
|
||||
#include "InputFilter.h"
|
||||
#include "archutils/Unix/X11Helper.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/keysym.h>
|
||||
|
||||
|
||||
using namespace X11Helper;
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS( X11 );
|
||||
@@ -53,7 +56,7 @@ static DeviceButton XSymToDeviceButton( int key )
|
||||
/* XK_KP_0 ... XK_KP_9 to KEY_KP_C0 ... KEY_KP_C9 */
|
||||
if( key >= XK_KP_0 && key <= XK_KP_9 )
|
||||
return enum_add2(KEY_KP_C0, key - XK_KP_0);
|
||||
|
||||
|
||||
switch( key )
|
||||
{
|
||||
/* These are needed because of the way X registers the keypad. */
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
#include "InputHandler.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InputHandler_X11: public InputHandler
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
#include "arch/Lights/LightsDriver_SystemMessage.h"
|
||||
#include "arch/Lights/LightsDriver_Export.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
DriverList LightsDriver::m_pDriverList;
|
||||
|
||||
void LightsDriver::Create( const RString &sDrivers, std::vector<LightsDriver *> &Add )
|
||||
@@ -16,7 +19,7 @@ void LightsDriver::Create( const RString &sDrivers, std::vector<LightsDriver *>
|
||||
|
||||
std::vector<RString> asDriversToTry;
|
||||
split( sDrivers, ",", asDriversToTry, true );
|
||||
|
||||
|
||||
for (RString const &Driver : asDriversToTry)
|
||||
{
|
||||
RageDriver *pRet = m_pDriverList.Create( Driver );
|
||||
@@ -51,7 +54,7 @@ void LightsDriver::Reset()
|
||||
/*
|
||||
* (c) 2002-2005 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -61,7 +64,7 @@ void LightsDriver::Reset()
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include "LightsManager.h"
|
||||
#include "arch/RageDriver.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
struct LightsState;
|
||||
/** @brief Controls the lights. */
|
||||
class LightsDriver: public RageDriver
|
||||
@@ -32,7 +35,7 @@ public:
|
||||
* @author Chris Danford (c) 2003-2004
|
||||
* @section LICENSE
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -42,7 +45,7 @@ public:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include "RageLog.h"
|
||||
#include "arch/arch_default.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
LoadingWindow *LoadingWindow::Create()
|
||||
{
|
||||
if( !PREFSMAN->m_bShowLoadingWindow )
|
||||
@@ -59,7 +62,7 @@ LoadingWindow *LoadingWindow::Create()
|
||||
/*
|
||||
* (c) 2002-2005 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -69,7 +72,7 @@ LoadingWindow *LoadingWindow::Create()
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#import "RageFile.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@interface LoadingWindowHelper : NSObject
|
||||
{
|
||||
@public
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "LocalizedString.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
|
||||
static HBITMAP g_hBitmap = nullptr;
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
#include "MemoryCardDriver.h"
|
||||
#include "RageFileManager.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
#include "ProfileManager.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
static const RString TEMP_MOUNT_POINT = "/@mctemptimeout/";
|
||||
|
||||
enum MemoryCardDriverType {
|
||||
@@ -121,7 +123,7 @@ bool MemoryCardDriver::DoOneUpdate( bool bMount, std::vector<UsbStorageDevice>&
|
||||
* profile name (by mounting a temporary, private mountpoint),
|
||||
* and then unmount it until Mount() is called. */
|
||||
d.m_State = UsbStorageDevice::STATE_READY;
|
||||
|
||||
|
||||
FILEMAN->Mount( "dirro", d.sOsMountDir, TEMP_MOUNT_POINT );
|
||||
d.bIsNameAvailable = PROFILEMAN->FastLoadProfileNameFromMemoryCard( TEMP_MOUNT_POINT, d.sName );
|
||||
FILEMAN->Unmount( "dirro", d.sOsMountDir, TEMP_MOUNT_POINT );
|
||||
@@ -167,7 +169,7 @@ MemoryCardDriver *MemoryCardDriver::Create()
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -177,7 +179,7 @@ MemoryCardDriver *MemoryCardDriver::Create()
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
#ifndef MEMORY_CARD_DRIVER_H
|
||||
#define MEMORY_CARD_DRIVER_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
struct UsbStorageDevice
|
||||
{
|
||||
UsbStorageDevice() = default;
|
||||
|
||||
|
||||
void MakeBlank() { *this = {}; };
|
||||
|
||||
// -1 means "don't know"
|
||||
@@ -92,7 +95,7 @@ private:
|
||||
/*
|
||||
* (c) 2003-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -102,7 +105,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
#include "global.h"
|
||||
#include "global.h"
|
||||
#include "MemoryCardDriverThreaded_Folder.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
#include "PlayerNumber.h"
|
||||
#include "MemoryCardManager.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <bitset>
|
||||
#include <climits>
|
||||
#include <cstdlib>
|
||||
#include <vector>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <bitset>
|
||||
|
||||
|
||||
static int g_currentSerial = 0;
|
||||
|
||||
@@ -107,7 +109,7 @@ void MemoryCardDriverThreaded_Folder::Unmount( UsbStorageDevice* pDevice )
|
||||
/*
|
||||
* (c) 2018-2019 Electromuis
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -117,7 +119,7 @@ void MemoryCardDriverThreaded_Folder::Unmount( UsbStorageDevice* pDevice )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#ifndef MemoryCardDriverThreaded_Folder_H
|
||||
#ifndef MemoryCardDriverThreaded_Folder_H
|
||||
#define MemoryCardDriverThreaded_Folder_H 1
|
||||
|
||||
#include "MemoryCardDriver.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class MemoryCardDriverThreaded_Folder : public MemoryCardDriver
|
||||
{
|
||||
public:
|
||||
@@ -28,7 +31,7 @@ protected:
|
||||
/*
|
||||
* (c) 2018-2019 Electromuis
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -38,7 +41,7 @@ protected:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -5,23 +5,22 @@
|
||||
#include "RageTimer.h"
|
||||
|
||||
#include <cerrno>
|
||||
#include <climits>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined(HAVE_FCNTL_H)
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_DIRENT_H)
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
#include <cstddef>
|
||||
#include <fstream>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
bool MemoryCardDriverThreaded_Linux::TestWrite( UsbStorageDevice* pDevice )
|
||||
{
|
||||
if( access(pDevice->sOsMountDir, W_OK) == -1 )
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
#include "MemoryCardDriver.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class MemoryCardDriverThreaded_Linux : public MemoryCardDriver
|
||||
{
|
||||
public:
|
||||
@@ -27,7 +30,7 @@ protected:
|
||||
/*
|
||||
* (c) 2003-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -37,7 +40,7 @@ protected:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <IOKit/IOKitLib.h>
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include "MemoryCardDriver.h"
|
||||
#include "RageThreads.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class MemoryCardDriverThreaded_MacOSX : public MemoryCardDriver
|
||||
{
|
||||
public:
|
||||
@@ -11,12 +14,12 @@ public:
|
||||
~MemoryCardDriverThreaded_MacOSX();
|
||||
bool Mount( UsbStorageDevice *pDevice ) { return true; }
|
||||
void Unmount( UsbStorageDevice *pDevice );
|
||||
|
||||
|
||||
protected:
|
||||
bool USBStorageDevicesChanged();
|
||||
void GetUSBStorageDevices( std::vector<UsbStorageDevice>& vStorageDevicesOut );
|
||||
bool TestWrite( UsbStorageDevice *pDevice );
|
||||
|
||||
|
||||
private:
|
||||
MemoryCardDriverThreaded_MacOSX( const MemoryCardDriverThreaded_MacOSX &m );
|
||||
MemoryCardDriverThreaded_MacOSX &operator=( const MemoryCardDriverThreaded_MacOSX &m );
|
||||
@@ -38,7 +41,7 @@ private:
|
||||
/*
|
||||
* (c) 2005-2006, 2008 Steve Checkoway
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -48,7 +51,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
|
||||
MemoryCardDriverThreaded_Windows::MemoryCardDriverThreaded_Windows()
|
||||
{
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
#define MemoryCardDriverThreaded_Windows_H
|
||||
|
||||
#include "MemoryCardDriver.h"
|
||||
|
||||
#include <vector>
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
class MemoryCardDriverThreaded_Windows: public MemoryCardDriver
|
||||
{
|
||||
public:
|
||||
@@ -31,7 +34,7 @@ private:
|
||||
/*
|
||||
* (c) 2003-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -41,7 +44,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
#include "MemoryCardDriver.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class MemoryCardDriver_Null : public MemoryCardDriver
|
||||
{
|
||||
public:
|
||||
@@ -19,7 +22,7 @@ public:
|
||||
/*
|
||||
* (c) 2003-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -29,7 +32,7 @@ public:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
#include "arch/arch_default.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
void ForceToAscii( RString &str )
|
||||
{
|
||||
for( unsigned i=0; i<str.size(); ++i )
|
||||
@@ -50,7 +53,7 @@ bool RageMovieTexture::GetFourCC( RString fn, RString &handler, RString &type )
|
||||
if( file.Read((char *)type.c_str(), 4) != 4 )
|
||||
HANDLE_ERROR("Could not read.");
|
||||
ForceToAscii( type );
|
||||
|
||||
|
||||
if( file.Seek(0xBC) != 0xBC )
|
||||
HANDLE_ERROR("Could not seek.");
|
||||
handler = " ";
|
||||
@@ -70,7 +73,7 @@ static void DumpAVIDebugInfo( const RString& fn )
|
||||
RString type, handler;
|
||||
if( !RageMovieTexture::GetFourCC( fn, handler, type ) )
|
||||
return;
|
||||
|
||||
|
||||
LOG->Trace( "Movie %s has handler '%s', type '%s'", fn.c_str(), handler.c_str(), type.c_str() );
|
||||
}
|
||||
|
||||
@@ -81,31 +84,31 @@ static LocalizedString COULDNT_CREATE_MOVIE_DRIVER ( "Arch", "Couldn't create a
|
||||
RageMovieTexture *RageMovieTexture::Create( RageTextureID ID )
|
||||
{
|
||||
DumpAVIDebugInfo( ID.filename );
|
||||
|
||||
|
||||
RString sDrivers = g_sMovieDrivers;
|
||||
if( sDrivers.empty() )
|
||||
sDrivers = DEFAULT_MOVIE_DRIVER_LIST;
|
||||
|
||||
std::vector<RString> DriversToTry;
|
||||
split( sDrivers, ",", DriversToTry, true );
|
||||
|
||||
|
||||
if( DriversToTry.empty() )
|
||||
RageException::Throw( "%s", MOVIE_DRIVERS_EMPTY.GetValue().c_str() );
|
||||
|
||||
|
||||
RageMovieTexture *ret = nullptr;
|
||||
|
||||
|
||||
for (RString const &Driver : DriversToTry)
|
||||
{
|
||||
char const * driverString = Driver.c_str();
|
||||
LOG->Trace( "Initializing driver: %s", driverString );
|
||||
RageDriver *pDriverBase = RageMovieTextureDriver::m_pDriverList.Create( Driver );
|
||||
|
||||
|
||||
if( pDriverBase == nullptr )
|
||||
{
|
||||
LOG->Trace( "Unknown movie driver name: %s", driverString );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
RageMovieTextureDriver *pDriver = dynamic_cast<RageMovieTextureDriver *>( pDriverBase );
|
||||
ASSERT( pDriver != nullptr );
|
||||
|
||||
@@ -125,7 +128,7 @@ RageMovieTexture *RageMovieTexture::Create( RageTextureID ID )
|
||||
}
|
||||
if ( !ret )
|
||||
RageException::Throw( "%s", COULDNT_CREATE_MOVIE_DRIVER.GetValue().c_str() );
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -133,7 +136,7 @@ RageMovieTexture *RageMovieTexture::Create( RageTextureID ID )
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -143,7 +146,7 @@ RageMovieTexture *RageMovieTexture::Create( RageTextureID ID )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "arch/arch_default.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
|
||||
DriverList RageSoundDriver::m_pDriverList;
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "ProductInfo.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
||||
REGISTER_SOUND_DRIVER_CLASS( JACK );
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
||||
/* Register the RageSoundDriver_Pulseaudio class as sound driver "Pulse" */
|
||||
REGISTER_SOUND_DRIVER_CLASS2( Pulse, PulseAudio );
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#define _INC_MMREG
|
||||
#define _NTRTL_ /* Turn off default definition of DEFINE_GUIDEX */
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "archutils/Win32/ErrorStrings.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
||||
REGISTER_SOUND_DRIVER_CLASS( WaveOut );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user