summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2009-09-08 16:07:13 +0000
committerShawn Hoffman <godisgovernment@gmail.com>2009-09-08 16:07:13 +0000
commit3b76f6dc80c50737c79051461f86eb18c4a13b1d (patch)
tree4095f79cd5741ce999afdfef0798ddda968c022f /Source/Core/InputCommon/Src
parent463e93c41a87b5ebdba2fea607c746ee2a1b3dee (diff)
get rid of the 'ÂŻ' chars in source code...non ascii chars are not really good to have floating around for no reason. http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Non-ASCII_Characters#Non-ASCII_Characters
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4231 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon/Src')
-rw-r--r--Source/Core/InputCommon/Src/Configuration.cpp18
-rw-r--r--Source/Core/InputCommon/Src/DirectInputBase.cpp2
-rw-r--r--Source/Core/InputCommon/Src/DirectInputBase.h2
-rw-r--r--Source/Core/InputCommon/Src/SDL.cpp24
-rw-r--r--Source/Core/InputCommon/Src/SDL.h10
-rw-r--r--Source/Core/InputCommon/Src/XInput.cpp12
-rw-r--r--Source/Core/InputCommon/Src/XInput.h4
7 files changed, 36 insertions, 36 deletions
diff --git a/Source/Core/InputCommon/Src/Configuration.cpp b/Source/Core/InputCommon/Src/Configuration.cpp
index 1909fe2264..f7f25d2cfe 100644
--- a/Source/Core/InputCommon/Src/Configuration.cpp
+++ b/Source/Core/InputCommon/Src/Configuration.cpp
@@ -1,6 +1,6 @@
// Project description
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
// Name: Input Configuration and Calibration
// Description: Common SDL Input Functions
//
@@ -32,7 +32,7 @@
// Include
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
#if defined HAVE_WX && HAVE_WX
#include <wx/wx.h>
#endif
@@ -52,7 +52,7 @@ namespace InputCommon
// Degree to radian and back
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------
float Deg2Rad(float Deg)
{
return Deg * ((float)M_PI / 180.0f);
@@ -66,7 +66,7 @@ float Rad2Deg(float Rad)
// Check if the pad is within the dead zone, we assume the range is 0x8000
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ----------------
float CoordinatesToRadius(int x, int y)
{
return sqrt(pow((float)x, 2) + pow((float)y, 2));
@@ -90,13 +90,13 @@ bool IsDeadZone(float DeadZone, int x, int y)
// Scale down stick values from 0x8000 to 0x80
-/* ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+/* ----------------
The value returned by SDL_JoystickGetAxis is a signed integer s16
(-32768 to 32767). The value used for the gamecube controller is an unsigned
char u8 (0 to 255) with neutral at 0x80 (128), so that it's equivalent to a signed
-128 to 127.
*/
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ---------------------
int Pad_Convert(int _val)
{
/* If the limits on PadState[].axis[] actually is a u16 then we don't need this
@@ -119,7 +119,7 @@ int Pad_Convert(int _val)
// Adjust the radius
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ----------------
void RadiusAdjustment(int &_x, int &_y, int _pad, std::string SRadius)
{
// Get the radius setting
@@ -157,7 +157,7 @@ void RadiusAdjustment(int &_x, int &_y, int _pad, std::string SRadius)
XBox 360 Wireless: 85%
GameCube Controller (Third Party) with EMS Trio Linker Plus II: 60%
*/
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ---------------------
/* Calculate the distance from the outer edges of the box to the outer edges of the circle inside the box
at any angle from 0° to 360°. The returned value is 1 + Distance, for example at most sqrt(2) in the
@@ -233,7 +233,7 @@ void Square2Circle(int &_x, int &_y, int _pad, std::string SDiagonal, bool Circl
// Windows Virtual Key Codes Names
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ---------------------
#ifdef _WIN32
std::string VKToString(int keycode)
{
diff --git a/Source/Core/InputCommon/Src/DirectInputBase.cpp b/Source/Core/InputCommon/Src/DirectInputBase.cpp
index 80a6a93f5c..07aef5fbab 100644
--- a/Source/Core/InputCommon/Src/DirectInputBase.cpp
+++ b/Source/Core/InputCommon/Src/DirectInputBase.cpp
@@ -18,7 +18,7 @@
// Include
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
#include "DirectInputBase.h"
diff --git a/Source/Core/InputCommon/Src/DirectInputBase.h b/Source/Core/InputCommon/Src/DirectInputBase.h
index e9c4678eb8..a6b1fba183 100644
--- a/Source/Core/InputCommon/Src/DirectInputBase.h
+++ b/Source/Core/InputCommon/Src/DirectInputBase.h
@@ -21,7 +21,7 @@
// Include
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
#include <windows.h> // System
#include <stdio.h>
diff --git a/Source/Core/InputCommon/Src/SDL.cpp b/Source/Core/InputCommon/Src/SDL.cpp
index 601915562d..45767f9447 100644
--- a/Source/Core/InputCommon/Src/SDL.cpp
+++ b/Source/Core/InputCommon/Src/SDL.cpp
@@ -1,6 +1,6 @@
// Project description
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
// Name: SDL Input
// Description: Common SDL Input Functions
//
@@ -31,7 +31,7 @@
// Include
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
#define _SDL_MAIN_ // Avoid certain declarations in SDL.h
#include "SDL.h" // Local
#include "XInput.h"
@@ -40,7 +40,7 @@
// Definitions
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
int g_LastPad = 0;
@@ -50,14 +50,14 @@ namespace InputCommon
// Definitions
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
// Search attached devices. Populate joyinfo for all attached physical devices.
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -----------------------
bool SearchDevices(std::vector<CONTROLLER_INFO> &_joyinfo, int &_NumPads, int &_NumGoodPads)
{
/* SDL 1.3 use DirectInput instead of the old Microsoft Multimedia API, and with this we need
@@ -113,16 +113,16 @@ bool SearchDevices(std::vector<CONTROLLER_INFO> &_joyinfo, int &_NumPads, int &_
// Supporting functions
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ----------------
// Read current joystick status
-/* ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+/* ----------------
The value PadMapping[].buttons[] is the number of the assigned joypad button,
PadState[].buttons[] is the status of the button, it becomes 0 (no pressed) or 1 (pressed) */
// Read buttons status. Called from GetJoyState().
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ----------------------
void ReadButton(CONTROLLER_STATE &_PadState, CONTROLLER_MAPPING _PadMapping, int button, int NumButtons)
{
int ctl_button = _PadMapping.buttons[button];
@@ -133,7 +133,7 @@ void ReadButton(CONTROLLER_STATE &_PadState, CONTROLLER_MAPPING _PadMapping, int
}
// Request joystick state.
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ----------------------
/* Called from: PAD_GetStatus()
Input: The virtual device 0, 1, 2 or 3
Function: Updates the PadState struct with the current pad status. The input value "controller" is
@@ -242,10 +242,10 @@ void GetJoyState(CONTROLLER_STATE &_PadState, CONTROLLER_MAPPING _PadMapping, in
// Configure button mapping
-// ŻŻŻŻŻŻŻŻŻŻ
+// ----------
// Avoid extreme axis values
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ---------------------
/* Function: We have to avoid very big values to becuse some triggers are -0x8000 in the
unpressed state (and then go from -0x8000 to 0x8000 as they are fully pressed) */
bool AvoidValues(int value, bool NoTriggerFilter)
@@ -260,7 +260,7 @@ bool AvoidValues(int value, bool NoTriggerFilter)
// Detect a pressed button
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// ---------------------
void GetButton(SDL_Joystick *joy, int ControllerID, int buttons, int axes, int hats,
int &KeyboardKey, int &value, int &type, int &pressed, bool &Succeed, bool &Stop,
bool LeftRight, bool Axis, bool XInput, bool Button, bool Hat, bool NoTriggerFilter)
diff --git a/Source/Core/InputCommon/Src/SDL.h b/Source/Core/InputCommon/Src/SDL.h
index 1539111e8c..739665d7ad 100644
--- a/Source/Core/InputCommon/Src/SDL.h
+++ b/Source/Core/InputCommon/Src/SDL.h
@@ -1,6 +1,6 @@
// Project description
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
// Name: SDL Input
// Description: Common SDL Input Functions
//
@@ -33,7 +33,7 @@
// Include
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
#include <iostream> // System
#include <vector>
#include <cmath>
@@ -53,14 +53,14 @@ namespace InputCommon
// Settings
-// ŻŻŻŻŻŻŻŻŻŻ
+// ----------
// Show a status window with the detected axes, buttons and so on
//#define SHOW_PAD_STATUS
// Structures
-/* ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+/* -------------------
CONTROLLER_STATE buttons (PadState) = 0 or 1
CONTROLLER_MAPPING buttons (joystick) = 0 or 1, 2, 3, 4, a certain joypad button
@@ -225,7 +225,7 @@ struct CONTROLLER_MAPPING_NEW // GC PAD MAPPING
// Declarations
-// ŻŻŻŻŻŻŻŻŻ
+// ---------
// General functions
bool SearchDevices(std::vector<CONTROLLER_INFO> &_joyinfo, int &NumPads, int &NumGoodPads);
diff --git a/Source/Core/InputCommon/Src/XInput.cpp b/Source/Core/InputCommon/Src/XInput.cpp
index e49fe65ade..267bf4e714 100644
--- a/Source/Core/InputCommon/Src/XInput.cpp
+++ b/Source/Core/InputCommon/Src/XInput.cpp
@@ -22,7 +22,7 @@
// File description
-/* ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+/* -------------------
Function: This file will get the status of the analog triggers of any connected XInput device.
This code was made with the help of SimpleController.cpp in the June 2008 Microsoft DirectX SDK
Samples.
@@ -33,7 +33,7 @@
// Includes
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
#include <windows.h>
#include <XInput.h> // XInput API
@@ -47,7 +47,7 @@ namespace XInput
// Declarations
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
#define MAX_CONTROLLERS 4 // XInput handles up to 4 controllers
@@ -62,7 +62,7 @@ CONTROLER_STATE g_Controllers[MAX_CONTROLLERS];
// Init
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
/* Function: Calculate the number of connected XInput devices
Todo: Implement this to figure out if there are multiple XInput controllers connected,
we currently only try to connect to XInput device 0 */
@@ -92,7 +92,7 @@ void Init()
// Get the trigger status
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
int GetXI(int Controller, int Button)
{
// Update the internal status
@@ -118,7 +118,7 @@ int GetXI(int Controller, int Button)
// Check if a certain controller is connected
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+// -------------------
bool IsConnected(int Controller)
{
DWORD dwResult = XInputGetState( Controller, &g_Controllers[Controller].state );
diff --git a/Source/Core/InputCommon/Src/XInput.h b/Source/Core/InputCommon/Src/XInput.h
index 0c43381bd8..30ba93c79e 100644
--- a/Source/Core/InputCommon/Src/XInput.h
+++ b/Source/Core/InputCommon/Src/XInput.h
@@ -23,7 +23,7 @@
// Includes
-// ŻŻŻŻŻŻŻŻŻŻ
+// ----------
#include <iostream>
@@ -34,7 +34,7 @@ namespace XInput
// Declarations
-// ŻŻŻŻŻŻŻŻŻŻ
+// ----------
void Init();
int GetXI(int Controller, int Button);
bool IsConnected(int Controller);