mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -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:
@ -218,7 +218,7 @@ if(m_frame->ScanMails)
|
||||
if(addnew == m_frame->sMail.size())
|
||||
{
|
||||
//Console::Print("%i | %i\n", addnew, m_frame->sMail.size());
|
||||
u32 resizeTo = m_frame->sMail.size() + 1;
|
||||
u32 resizeTo = (u32)(m_frame->sMail.size() + 1);
|
||||
|
||||
// ------------------------------------
|
||||
// get timestamp
|
||||
|
@ -520,7 +520,7 @@ bool gd_dis_file(gd_globals_t* gdg, char* name, FILE* output)
|
||||
}
|
||||
|
||||
fseek(in, 0, SEEK_END);
|
||||
size = ftell(in);
|
||||
size = (int)ftell(in);
|
||||
fseek(in, 0, SEEK_SET);
|
||||
gdg->binbuf = (uint16*)malloc(size);
|
||||
fread(gdg->binbuf, 1, size, in);
|
||||
|
@ -199,7 +199,7 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta
|
||||
//todo: add tabs every something like 4*char_width
|
||||
*t=0;
|
||||
|
||||
int cpos = strlen(temp);
|
||||
int cpos = (int)strlen(temp);
|
||||
|
||||
int newpos = (cpos+4)&(~3);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Version="9.00"
|
||||
Name="Plugin_Wiimote"
|
||||
ProjectGUID="{8D612734-FAA5-4B8A-804F-4DEA2367D495}"
|
||||
RootNamespace="Plugin_Wiimote"
|
||||
@ -296,13 +296,13 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\WiiUse\inc"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS;_SECURE_SCL=0"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
|
||||
RuntimeLibrary="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
WarnAsError="false"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -164,7 +164,7 @@ void CreateAckDelay(u8 _ChannelID, u16 _ReportID)
|
||||
wm_ackdelay Tmp;
|
||||
Tmp.Delay = GlobalDelay;
|
||||
Tmp.ChannelID = _ChannelID;
|
||||
Tmp.ReportID = _ReportID;
|
||||
Tmp.ReportID = (u8)_ReportID;
|
||||
AckDelay.push_back(Tmp);
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ void InterruptChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
//if((data[1] == WM_WRITE_DATA || data[1] == WM_READ_DATA)
|
||||
// && data[3] == 0xa4)
|
||||
//{
|
||||
CreateAckDelay(_channelID, sr->channel);
|
||||
CreateAckDelay((u8)_channelID, (u16)sr->channel);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
@ -180,7 +180,7 @@ void FillReportAcc(wm_accel& _acc)
|
||||
|| shake > 0
|
||||
);
|
||||
#endif
|
||||
if(yhistsize > yhist.size()) yhistsize = yhist.size();
|
||||
if(yhistsize > yhist.size()) yhistsize = (int)yhist.size();
|
||||
for (int i = 1; i < yhistsize; i++)
|
||||
{
|
||||
yhist[i-1] = yhist[i];
|
||||
|
@ -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
|
||||
|
||||
|
@ -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_Test"
|
||||
ProjectGUID="{ADF64291-57ED-4B7A-AB76-37B4A991504B}"
|
||||
RootNamespace="Plugin_nJoy_SDL"
|
||||
@ -286,7 +286,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\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"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
|
@ -51,7 +51,6 @@
|
||||
#pragma comment(lib, "comctl32.lib")
|
||||
#include <tchar.h>
|
||||
#include <math.h>
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
|
Reference in New Issue
Block a user