mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
Some warning and code cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1998 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Version="9.00"
|
||||
Name="Plugin_nJoy_SDL"
|
||||
ProjectGUID="{521498BE-6089-4780-8223-E67C22F4E068}"
|
||||
RootNamespace="Plugin_nJoy_SDL"
|
||||
@ -283,7 +283,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\Include_1.2;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_NJOY_SDL_EXPORTS;_SECURE_SCL=0"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_NJOY_SDL_EXPORTS;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
Config g_Config;
|
||||
extern ConfigBox* m_frame;
|
||||
|
||||
//////////////////////////////////
|
||||
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include "../nJoy.h"
|
||||
#include "Images/njoy.xpm"
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE(AboutBox,wxDialog)
|
||||
EVT_CLOSE(AboutBox::OnClose)
|
||||
EVT_BUTTON(ID_OK, AboutBox::OKClick)
|
||||
|
@ -455,7 +455,7 @@ void ConfigBox::UpdateGUI(int _notebookpage)
|
||||
LogMsg("Update: %i\n", g_Config.bSaveByID);
|
||||
|
||||
// Disabled pages
|
||||
bool Enabled = PadMapping[_notebookpage].enabled;
|
||||
bool Enabled = PadMapping[_notebookpage].enabled == 1 ? true : false;
|
||||
// There is no FindItem in linux so this doesn't work
|
||||
#ifdef _WIN32
|
||||
// Enable or disable all buttons
|
||||
|
@ -56,7 +56,7 @@ void ConfigBox::UpdateGUIKeys(int controller)
|
||||
m_Joyname[controller]->SetSelection(PadMapping[controller].ID);
|
||||
|
||||
// Update the enabled checkbox
|
||||
m_Joyattach[controller]->SetValue(PadMapping[controller].enabled);
|
||||
m_Joyattach[controller]->SetValue(PadMapping[controller].enabled == 1 ? true : false);
|
||||
|
||||
tmp << PadMapping[controller].buttons[CTL_L_SHOULDER]; m_JoyShoulderL[controller]->SetValue(tmp); tmp.clear();
|
||||
tmp << PadMapping[controller].buttons[CTL_R_SHOULDER]; m_JoyShoulderR[controller]->SetValue(tmp); tmp.clear();
|
||||
@ -203,28 +203,32 @@ wxString ConfigBox::GetButtonText(int id)
|
||||
|
||||
switch(id)
|
||||
{
|
||||
// D-Pad
|
||||
case IDB_DPAD_RIGHT: return m_JoyDpadRight[controller]->GetValue();
|
||||
case IDB_DPAD_UP: return m_JoyDpadUp[controller]->GetValue(); break;
|
||||
case IDB_DPAD_DOWN: return m_JoyDpadDown[controller]->GetValue(); break;
|
||||
case IDB_DPAD_LEFT: return m_JoyDpadLeft[controller]->GetValue(); break;
|
||||
case IDB_DPAD_UP: return m_JoyDpadUp[controller]->GetValue();
|
||||
case IDB_DPAD_DOWN: return m_JoyDpadDown[controller]->GetValue();
|
||||
case IDB_DPAD_LEFT: return m_JoyDpadLeft[controller]->GetValue();
|
||||
|
||||
case IDB_ANALOG_MAIN_X: return m_JoyAnalogMainX[controller]->GetValue(); break;
|
||||
case IDB_ANALOG_MAIN_Y: return m_JoyAnalogMainY[controller]->GetValue(); break;
|
||||
case IDB_ANALOG_SUB_X: return m_JoyAnalogSubX[controller]->GetValue(); break;
|
||||
case IDB_ANALOG_SUB_Y: return m_JoyAnalogSubY[controller]->GetValue(); break;
|
||||
// Analog Stick
|
||||
case IDB_ANALOG_MAIN_X: return m_JoyAnalogMainX[controller]->GetValue();
|
||||
case IDB_ANALOG_MAIN_Y: return m_JoyAnalogMainY[controller]->GetValue();
|
||||
case IDB_ANALOG_SUB_X: return m_JoyAnalogSubX[controller]->GetValue();
|
||||
case IDB_ANALOG_SUB_Y: return m_JoyAnalogSubY[controller]->GetValue();
|
||||
|
||||
case IDB_SHOULDER_L: return m_JoyShoulderL[controller]->GetValue(); break;
|
||||
case IDB_SHOULDER_R: return m_JoyShoulderR[controller]->GetValue(); break;
|
||||
// Shoulder Buttons
|
||||
case IDB_SHOULDER_L: return m_JoyShoulderL[controller]->GetValue();
|
||||
case IDB_SHOULDER_R: return m_JoyShoulderR[controller]->GetValue();
|
||||
|
||||
case IDB_BUTTON_A: return m_JoyButtonA[controller]->GetValue(); break;
|
||||
case IDB_BUTTON_B: return m_JoyButtonB[controller]->GetValue(); break;
|
||||
case IDB_BUTTON_X: return m_JoyButtonX[controller]->GetValue(); break;
|
||||
case IDB_BUTTON_Y: return m_JoyButtonY[controller]->GetValue(); break;
|
||||
case IDB_BUTTON_Z: return m_JoyButtonZ[controller]->GetValue(); break;
|
||||
case IDB_BUTTONSTART: return m_JoyButtonStart[controller]->GetValue(); break;
|
||||
// Buttons
|
||||
case IDB_BUTTON_A: return m_JoyButtonA[controller]->GetValue();
|
||||
case IDB_BUTTON_B: return m_JoyButtonB[controller]->GetValue();
|
||||
case IDB_BUTTON_X: return m_JoyButtonX[controller]->GetValue();
|
||||
case IDB_BUTTON_Y: return m_JoyButtonY[controller]->GetValue();
|
||||
case IDB_BUTTON_Z: return m_JoyButtonZ[controller]->GetValue();
|
||||
case IDB_BUTTONSTART: return m_JoyButtonStart[controller]->GetValue();
|
||||
|
||||
case IDB_BUTTONHALFPRESS: return m_JoyButtonHalfpress[controller]->GetValue(); break;
|
||||
default: break;
|
||||
case IDB_BUTTONHALFPRESS: return m_JoyButtonHalfpress[controller]->GetValue();
|
||||
default: return wxString("");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -666,7 +666,7 @@ std::vector<int> Pad_Square_to_Circle(int _x, int _y, int _pad)
|
||||
float SquareDist = SquareDistance(deg);
|
||||
float adj_ratio1; // The original-to-square distance adjustment
|
||||
float adj_ratio2 = SquareDist; // The circle-to-square distance adjustment
|
||||
float final_ratio; // The final adjustment to the current distance
|
||||
// float final_ratio; // The final adjustment to the current distance //TODO: This is not used
|
||||
float result_dist; // The resulting distance
|
||||
|
||||
// Calculate the corner-to-square adjustment ratio
|
||||
|
@ -64,7 +64,6 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <tchar.h>
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
|
Reference in New Issue
Block a user