mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-26 07:35:40 +00:00
remove using namespace from headers ..
This commit is contained in:
parent
53c98283aa
commit
f7678d918e
|
@ -153,9 +153,9 @@ void CInput::LoadFromConfig(const Util::Config::Node &config)
|
||||||
if (IsConfigurable())
|
if (IsConfigurable())
|
||||||
{
|
{
|
||||||
// If so, check INI file for mapping string
|
// If so, check INI file for mapping string
|
||||||
string key("Input");
|
std::string key("Input");
|
||||||
key.append(id);
|
key.append(id);
|
||||||
string mapping;
|
std::string mapping;
|
||||||
auto *node = config.TryGet(key);
|
auto *node = config.TryGet(key);
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
|
@ -174,7 +174,7 @@ void CInput::StoreToConfig(Util::Config::Node *config)
|
||||||
{
|
{
|
||||||
if (!IsConfigurable())
|
if (!IsConfigurable())
|
||||||
return;
|
return;
|
||||||
string key("Input");
|
std::string key("Input");
|
||||||
key.append(id);
|
key.append(id);
|
||||||
config->Set(key, m_mapping);
|
config->Set(key, m_mapping);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#define INCLUDED_INPUTSOURCE_H
|
#define INCLUDED_INPUTSOURCE_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
class CInputSystem;
|
class CInputSystem;
|
||||||
struct ForceFeedbackCmd;
|
struct ForceFeedbackCmd;
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
#include "MultiInputSource.h"
|
#include "MultiInputSource.h"
|
||||||
#include "Util/NewConfig.h"
|
#include "Util/NewConfig.h"
|
||||||
|
|
||||||
|
@ -355,9 +353,9 @@ private:
|
||||||
JoySettings m_defJoySettings;
|
JoySettings m_defJoySettings;
|
||||||
|
|
||||||
// Current key, mouse and joystick settings for attached keyboards, mice and joysticks
|
// Current key, mouse and joystick settings for attached keyboards, mice and joysticks
|
||||||
vector<KeySettings*> m_keySettings;
|
std::vector<KeySettings*> m_keySettings;
|
||||||
vector<MouseSettings*> m_mseSettings;
|
std::vector<MouseSettings*> m_mseSettings;
|
||||||
vector<JoySettings*> m_joySettings;
|
std::vector<JoySettings*> m_joySettings;
|
||||||
|
|
||||||
// Empty input source
|
// Empty input source
|
||||||
CMultiInputSource *m_emptySource;
|
CMultiInputSource *m_emptySource;
|
||||||
|
@ -399,46 +397,46 @@ private:
|
||||||
*/
|
*/
|
||||||
CInputSource *GetJoySource(int joyNum, EJoyPart joyPart);
|
CInputSource *GetJoySource(int joyNum, EJoyPart joyPart);
|
||||||
|
|
||||||
void CheckAllSources(unsigned readFlags, bool fullAxisOnly, bool &mseCentered, vector<CInputSource*> &sources, string &mapping, vector<CInputSource*> &badSources);
|
void CheckAllSources(unsigned readFlags, bool fullAxisOnly, bool &mseCentered, std::vector<CInputSource*> &sources, std::string &mapping, std::vector<CInputSource*> &badSources);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finds any currently activated key sources for the given keyboard number (or all keyboards if ANY_KEYBOARD supplied)
|
* Finds any currently activated key sources for the given keyboard number (or all keyboards if ANY_KEYBOARD supplied)
|
||||||
* and adds them to the sources vector, aswell as constructing the corresponding mapping(s) in the given string.
|
* and adds them to the sources vector, aswell as constructing the corresponding mapping(s) in the given string.
|
||||||
* If fullAxisOnly is true, then only sources that represent a full axis range (eg MouseXAxis) are considered.
|
* If fullAxisOnly is true, then only sources that represent a full axis range (eg MouseXAxis) are considered.
|
||||||
*/
|
*/
|
||||||
void CheckKeySources(int kbdNum, bool fullAxisOnly, vector<CInputSource*> &sources, string &mapping, vector<CInputSource*> &badSources);
|
void CheckKeySources(int kbdNum, bool fullAxisOnly, std::vector<CInputSource*> &sources, std::string &mapping, std::vector<CInputSource*> &badSources);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finds any currently activated mouse sources for the given mouse number (or all mice if ANY_MOUSE supplied)
|
* Finds any currently activated mouse sources for the given mouse number (or all mice if ANY_MOUSE supplied)
|
||||||
* and adds them to the sources vector, aswell as constructing the corresponding mapping(s) in the given string.
|
* and adds them to the sources vector, aswell as constructing the corresponding mapping(s) in the given string.
|
||||||
* If fullAxisOnly is true, then only sources that represent a full axis range (eg MouseXAxis) are considered.
|
* If fullAxisOnly is true, then only sources that represent a full axis range (eg MouseXAxis) are considered.
|
||||||
*/
|
*/
|
||||||
void CheckMouseSources(int mseNum, bool fullAxisOnly, bool mseCentered, vector<CInputSource*> &sources, string &mapping, vector<CInputSource*> &badSources);
|
void CheckMouseSources(int mseNum, bool fullAxisOnly, bool mseCentered, std::vector<CInputSource*> &sources, std::string &mapping, std::vector<CInputSource*> &badSources);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finds any currently activated joystick sources for the given joystick number (or all joysticks if ANY_JOYSTICK supplied)
|
* Finds any currently activated joystick sources for the given joystick number (or all joysticks if ANY_JOYSTICK supplied)
|
||||||
* and adds them to the sources vector, aswell as constructing the corresponding mapping(s) in the given string.
|
* and adds them to the sources vector, aswell as constructing the corresponding mapping(s) in the given string.
|
||||||
* If fullAxisOnly is true, then only sources that represent a full axis range (eg MouseXAxis) are considered.
|
* If fullAxisOnly is true, then only sources that represent a full axis range (eg MouseXAxis) are considered.
|
||||||
*/
|
*/
|
||||||
void CheckJoySources(int joyNum, bool fullAxisOnly, vector<CInputSource*> &sources, string &mapping, vector<CInputSource*> &badSources);
|
void CheckJoySources(int joyNum, bool fullAxisOnly, std::vector<CInputSource*> &sources, std::string &mapping, std::vector<CInputSource*> &badSources);
|
||||||
|
|
||||||
bool ParseInt(string str, int &num);
|
bool ParseInt(std::string str, int &num);
|
||||||
|
|
||||||
string IntToString(int num);
|
std::string IntToString(int num);
|
||||||
|
|
||||||
bool EqualsIgnoreCase(string str1, const char *str2);
|
bool EqualsIgnoreCase(std::string str1, const char *str2);
|
||||||
|
|
||||||
bool StartsWithIgnoreCase(string str1, const char *str2);
|
bool StartsWithIgnoreCase(std::string str1, const char *str2);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns true if the given string represents a valid key name.
|
* Returns true if the given string represents a valid key name.
|
||||||
*/
|
*/
|
||||||
bool IsValidKeyName(string str);
|
bool IsValidKeyName(std::string str);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the EMousePart with the given mapping name or MouseUnknown if not found.
|
* Returns the EMousePart with the given mapping name or MouseUnknown if not found.
|
||||||
*/
|
*/
|
||||||
EMousePart LookupMousePart(string str);
|
EMousePart LookupMousePart(std::string str);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the mapping name for the given EMousePart.
|
* Returns the mapping name for the given EMousePart.
|
||||||
|
@ -448,26 +446,26 @@ private:
|
||||||
/*
|
/*
|
||||||
* Returns the EJoyPart with the given mapping name or JoyUnknown if not found.
|
* Returns the EJoyPart with the given mapping name or JoyUnknown if not found.
|
||||||
*/
|
*/
|
||||||
EJoyPart LookupJoyPart(string str);
|
EJoyPart LookupJoyPart(std::string str);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the mapping name for the given EJoyPart.
|
* Returns the mapping name for the given EJoyPart.
|
||||||
*/
|
*/
|
||||||
const char *LookupName(EJoyPart joyPart);
|
const char *LookupName(EJoyPart joyPart);
|
||||||
|
|
||||||
size_t ParseDevMapping(string str, const char *devType, int &devNum);
|
size_t ParseDevMapping(std::string str, const char *devType, int &devNum);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parses the given mapping string, possibly representing more than one mapping, and returns an input source for it or NULL if the
|
* Parses the given mapping string, possibly representing more than one mapping, and returns an input source for it or NULL if the
|
||||||
* mapping is invalid.
|
* mapping is invalid.
|
||||||
* If fullAxisOnly is true, then only mappings that represent a full axis range (eg MouseXAxis) are parsed.
|
* If fullAxisOnly is true, then only mappings that represent a full axis range (eg MouseXAxis) are parsed.
|
||||||
*/
|
*/
|
||||||
CInputSource* ParseMultiSource(string str, bool fullAxisOnly, bool isOr);
|
CInputSource* ParseMultiSource(std::string str, bool fullAxisOnly, bool isOr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parses the given single mapping string and returns an input source for it, or NULL if non exists.
|
* Parses the given single mapping string and returns an input source for it, or NULL if non exists.
|
||||||
*/
|
*/
|
||||||
CInputSource* ParseSingleSource(string str);
|
CInputSource* ParseSingleSource(std::string str);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prints the given key settings to stdout.
|
* Prints the given key settings to stdout.
|
||||||
|
|
|
@ -184,7 +184,7 @@ CTriggerInput::CTriggerInput(const char *inputId, const char *inputLabel, unsign
|
||||||
|
|
||||||
void CTriggerInput::LoadFromConfig(const Util::Config::Node &config)
|
void CTriggerInput::LoadFromConfig(const Util::Config::Node &config)
|
||||||
{
|
{
|
||||||
string key("Input");
|
std::string key("Input");
|
||||||
key.append(id);
|
key.append(id);
|
||||||
auto *node = config.TryGet(key);
|
auto *node = config.TryGet(key);
|
||||||
if (node)
|
if (node)
|
||||||
|
@ -193,7 +193,7 @@ void CTriggerInput::LoadFromConfig(const Util::Config::Node &config)
|
||||||
|
|
||||||
void CTriggerInput::StoreToConfig(Util::Config::Node *config)
|
void CTriggerInput::StoreToConfig(Util::Config::Node *config)
|
||||||
{
|
{
|
||||||
string key("Input");
|
std::string key("Input");
|
||||||
key.append(id);
|
key.append(id);
|
||||||
config->Set(key, (unsigned) m_autoTrigger);
|
config->Set(key, (unsigned) m_autoTrigger);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,7 @@
|
||||||
|
|
||||||
#include "Types.h"
|
#include "Types.h"
|
||||||
#include "Util/NewConfig.h"
|
#include "Util/NewConfig.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
class CInputSystem;
|
class CInputSystem;
|
||||||
class CInput;
|
class CInput;
|
||||||
|
@ -53,7 +51,7 @@ private:
|
||||||
CInputSystem *m_system;
|
CInputSystem *m_system;
|
||||||
|
|
||||||
// Vector of all created inputs
|
// Vector of all created inputs
|
||||||
vector<CInput*> m_inputs;
|
std::vector<CInput*> m_inputs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Adds a switch input (eg button) to this collection.
|
* Adds a switch input (eg button) to this collection.
|
||||||
|
|
|
@ -30,9 +30,8 @@
|
||||||
#define INCLUDED_MULTIINPUTSOURCE_H
|
#define INCLUDED_MULTIINPUTSOURCE_H
|
||||||
|
|
||||||
#include "InputSource.h"
|
#include "InputSource.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Represents a collection of input sources and combines their values into a single value.
|
* Represents a collection of input sources and combines their values into a single value.
|
||||||
|
@ -56,7 +55,7 @@ public:
|
||||||
/*
|
/*
|
||||||
* Returns the combined source type of the given vector of sources.
|
* Returns the combined source type of the given vector of sources.
|
||||||
*/
|
*/
|
||||||
static ESourceType GetCombinedType(vector<CInputSource*> &sources);
|
static ESourceType GetCombinedType(std::vector<CInputSource*> &sources);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constructs an 'empty' source (ie one which is always 'off').
|
* Constructs an 'empty' source (ie one which is always 'off').
|
||||||
|
@ -69,7 +68,7 @@ public:
|
||||||
* switch inputs must be active for this input to have a value (which will be the value of the first non-switch input in the list,
|
* switch inputs must be active for this input to have a value (which will be the value of the first non-switch input in the list,
|
||||||
* or the first switch input if there are none).
|
* or the first switch input if there are none).
|
||||||
*/
|
*/
|
||||||
CMultiInputSource(bool isOr, vector<CInputSource*> &sources);
|
CMultiInputSource(bool isOr, std::vector<CInputSource*> &sources);
|
||||||
|
|
||||||
~CMultiInputSource();
|
~CMultiInputSource();
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,6 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IPCIDevice:
|
* IPCIDevice:
|
||||||
*
|
*
|
||||||
|
@ -183,7 +180,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// An array of device objects
|
// An array of device objects
|
||||||
vector<struct DeviceObjectLink> DeviceVector;
|
std::vector<struct DeviceObjectLink> DeviceVector;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -451,8 +451,8 @@ private:
|
||||||
uint8_t *textureRAMDirty;
|
uint8_t *textureRAMDirty;
|
||||||
|
|
||||||
// Queued texture uploads
|
// Queued texture uploads
|
||||||
vector<QueuedUploadTextures> queuedUploadTextures;
|
std::vector<QueuedUploadTextures> queuedUploadTextures;
|
||||||
vector<QueuedUploadTextures> queuedUploadTexturesRO; // Read-only copy of queue
|
std::vector<QueuedUploadTextures> queuedUploadTexturesRO; // Read-only copy of queue
|
||||||
|
|
||||||
// Big endian bus object for DMA memory access
|
// Big endian bus object for DMA memory access
|
||||||
IBus *Bus;
|
IBus *Bus;
|
||||||
|
|
|
@ -268,7 +268,7 @@ bool OpenAudio()
|
||||||
|
|
||||||
// Set initial play position to be beginning of buffer and initial write position to be half-way into buffer
|
// Set initial play position to be beginning of buffer and initial write position to be half-way into buffer
|
||||||
playPos = 0;
|
playPos = 0;
|
||||||
writePos = min<int>(audioBufferSize - BYTES_PER_FRAME, (BYTES_PER_FRAME + audioBufferSize) / 2);
|
writePos = std::min<int>(audioBufferSize - BYTES_PER_FRAME, (BYTES_PER_FRAME + audioBufferSize) / 2);
|
||||||
writeWrapped = false;
|
writeWrapped = false;
|
||||||
|
|
||||||
// Reset counters
|
// Reset counters
|
||||||
|
|
Loading…
Reference in a new issue