diff --git a/Externals/SDL/Include/SDL_stdinc.h b/Externals/SDL/Include/SDL_stdinc.h index 32750c4d72..1792759cc7 100644 --- a/Externals/SDL/Include/SDL_stdinc.h +++ b/Externals/SDL/Include/SDL_stdinc.h @@ -642,7 +642,7 @@ extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap); #endif -#ifndef HAVE_M_PI +#ifndef M_PI #define M_PI 3.14159265358979323846264338327950288 /* pi */ #endif diff --git a/Externals/wxWidgets/build/msw/wx_adv.vcproj b/Externals/wxWidgets/build/msw/wx_adv.vcproj index bb2e5a5d12..1f0ee58a58 100644 --- a/Externals/wxWidgets/build/msw/wx_adv.vcproj +++ b/Externals/wxWidgets/build/msw/wx_adv.vcproj @@ -441,6 +441,7 @@ ProgramDataBaseFileName="$(IntDir)\vc80.pdb" WarningLevel="4" SuppressStartupBanner="true" + DisableSpecificWarnings="4267" /> + + @@ -2188,10 +2193,6 @@ /> - - - - @@ -5799,6 +5796,10 @@ /> + + - - @@ -17023,6 +17020,10 @@ /> + + + + + + + + + + + + + + + + + - - diff --git a/Source/Core/DebuggerWX/Src/Debugger.cpp b/Source/Core/DebuggerWX/Src/Debugger.cpp deleted file mode 100644 index 2bf8df55ff..0000000000 --- a/Source/Core/DebuggerWX/Src/Debugger.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2003-2008 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#include "Debugger.h" - diff --git a/Source/Core/DebuggerWX/Src/MemoryView.cpp b/Source/Core/DebuggerWX/Src/MemoryView.cpp index 020caa29c4..338bbeef94 100644 --- a/Source/Core/DebuggerWX/Src/MemoryView.cpp +++ b/Source/Core/DebuggerWX/Src/MemoryView.cpp @@ -212,7 +212,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event) int src, dst, srcAddr; }; - branch branches[256]; + // branch branches[256]; // TODO: This is not being used int numBranches = 0; // TODO: Add any drawing code here... int width = rc.width; diff --git a/Source/Core/DebuggerWX/Src/SConscript b/Source/Core/DebuggerWX/Src/SConscript index 59ec56c32a..044509d665 100644 --- a/Source/Core/DebuggerWX/Src/SConscript +++ b/Source/Core/DebuggerWX/Src/SConscript @@ -13,7 +13,6 @@ files = ["LogWindow.cpp", "CodeWindow.cpp", "CodeWindowSJP.cpp", "CodeView.cpp", - "Debugger.cpp", "MemoryCheckDlg.cpp", "MemoryView.cpp", "MemoryWindow.cpp", diff --git a/Source/Core/DiscIO/Src/BannerLoader.cpp b/Source/Core/DiscIO/Src/BannerLoader.cpp index a45a286c4d..d14d40363f 100644 --- a/Source/Core/DiscIO/Src/BannerLoader.cpp +++ b/Source/Core/DiscIO/Src/BannerLoader.cpp @@ -101,7 +101,7 @@ bool IBannerLoader::CopySJISToString( std::string& _rDestination, const char* _s // HyperIris: because dolphin using "Use Multi-Byte Character Set", // we must convert the SJIS chars to unicode then to our windows local by hand u32 unicodeNameSize = MultiByteToWideChar(932, MB_PRECOMPOSED, - _src, strlen(_src), NULL, NULL); + _src, (int)strlen(_src), NULL, NULL); if (unicodeNameSize > 0) { u16* pUnicodeStrBuffer = new u16[unicodeNameSize + 1]; @@ -109,7 +109,7 @@ bool IBannerLoader::CopySJISToString( std::string& _rDestination, const char* _s { memset(pUnicodeStrBuffer, 0, (unicodeNameSize + 1) * sizeof(u16)); if (MultiByteToWideChar(932, MB_PRECOMPOSED, - _src, strlen(_src), + _src, (int)strlen(_src), (LPWSTR)pUnicodeStrBuffer, unicodeNameSize)) { u32 ansiNameSize = WideCharToMultiByte(CP_ACP, 0, @@ -150,7 +150,7 @@ bool IBannerLoader::CopyUnicodeToString( std::string& _rDestination, const u16* if (_src) { u32 ansiNameSize = WideCharToMultiByte(CP_ACP, 0, - (LPCWSTR)_src, wcslen((const wchar_t*)_src), + (LPCWSTR)_src, (int)wcslen((const wchar_t*)_src), NULL, NULL, NULL, NULL); if (ansiNameSize > 0) { @@ -159,7 +159,7 @@ bool IBannerLoader::CopyUnicodeToString( std::string& _rDestination, const u16* { memset(pAnsiStrBuffer, 0, (ansiNameSize + 1) * sizeof(char)); if (WideCharToMultiByte(CP_ACP, 0, - (LPCWSTR)_src, wcslen((const wchar_t*)_src), + (LPCWSTR)_src, (int)wcslen((const wchar_t*)_src), pAnsiStrBuffer, ansiNameSize, NULL, NULL)) { _rDestination = pAnsiStrBuffer; diff --git a/Source/Core/DiscIO/Src/VolumeDirectory.cpp b/Source/Core/DiscIO/Src/VolumeDirectory.cpp index e30513adeb..37fe0b8f4d 100644 --- a/Source/Core/DiscIO/Src/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/Src/VolumeDirectory.cpp @@ -145,7 +145,7 @@ void CVolumeDirectory::SetUniqueID(std::string _ID) { _dbg_assert_(DVDINTERFACE, m_diskHeader); - u32 length = _ID.length(); + u32 length = (u32)_ID.length(); if(length > 6) length = 6; @@ -218,7 +218,7 @@ void CVolumeDirectory::SetName(std::string _Name) { _dbg_assert_(DVDINTERFACE, m_diskHeader); - u32 length = _Name.length(); + u32 length = (u32)_Name.length(); if(length > MAX_NAME_LENGTH) length = MAX_NAME_LENGTH; @@ -410,7 +410,7 @@ void CVolumeDirectory::WriteEntryName(u32& nameOffset, const std::string& name) { strncpy((char*)(m_FSTData + nameOffset + m_fstNameOffset), name.c_str(), name.length() + 1); - nameOffset += (name.length() + 1); + nameOffset += (u32)(name.length() + 1); } void CVolumeDirectory::WriteEntry(const File::FSTEntry& entry, u32& fstOffset, u32& nameOffset, u64& dataOffset, u32 parentEntryNum) @@ -454,7 +454,7 @@ static u32 ComputeNameSize(const File::FSTEntry& parentEntry) { nameSize += ComputeNameSize(entry); } - nameSize += entry.virtualName.length() + 1; + nameSize += (u32)entry.virtualName.length() + 1; } return nameSize; } diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 5108c0e80c..ad86e7f9ae 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -380,7 +380,7 @@ void CGameListCtrl::ScanForISOs(bool bUpdateCache) { wxProgressDialog dialog(_T("Scanning for ISOs"), _T("Scanning..."), - rFilenames.size(), // range + (int)rFilenames.size(), // range this, // parent wxPD_APP_MODAL | // wxPD_AUTO_HIDE | -- try this as well diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index d8c2fc89f6..018d8194c0 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -679,7 +679,7 @@ void CISOProperties::PatchButtonClicked(wxCommandEvent& event) if (dlg.ShowModal() == wxID_OK) { Patches->Append(wxString::FromAscii(onFrame.back().name.c_str())); - Patches->Check(onFrame.size() - 1, onFrame.back().active); + Patches->Check((unsigned int)(onFrame.size() - 1), onFrame.back().active); } } break; diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 3c68f8438f..da74ce9e6d 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -312,7 +312,7 @@ void DolphinApp::OnEndSession() /////////////////////////////////////// Main window created #if defined HAVE_WX && HAVE_WX -bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int Style) +bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*/) { return wxYES == wxMessageBox(wxString::FromAscii(text), wxString::FromAscii(caption), diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index 8ebe2dc720..b848aa1f41 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -157,7 +157,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize) } Video_SendFifoData(uData, distToSend); Common::SyncInterlockedExchange((LONG*)&_fifo.CPReadPointer, readPtr); - Common::SyncInterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -distToSend); + Common::SyncInterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -(__int64)distToSend); } //video_initialize.pLog("..........................IDLE",FALSE); Common::SyncInterlockedExchange((LONG*)&_fifo.CPReadIdle, 1); diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp index ab0741db17..1ddecefa8d 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp @@ -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 diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/disassemble.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/disassemble.cpp index 99968a6f21..b29289fdad 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/disassemble.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/disassemble.cpp @@ -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); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/rasterfont.cpp b/Source/Plugins/Plugin_VideoOGL/Src/rasterfont.cpp index c4d8b6ba40..0fd5b7c0cf 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/rasterfont.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/rasterfont.cpp @@ -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); diff --git a/Source/Plugins/Plugin_Wiimote/Plugin_Wiimote.vcproj b/Source/Plugins/Plugin_Wiimote/Plugin_Wiimote.vcproj index 931493e29c..25f48fd05c 100644 --- a/Source/Plugins/Plugin_Wiimote/Plugin_Wiimote.vcproj +++ b/Source/Plugins/Plugin_Wiimote/Plugin_Wiimote.vcproj @@ -1,7 +1,7 @@ channel); + CreateAckDelay((u8)_channelID, (u16)sr->channel); //} //else //{ diff --git a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp index 853fb1d9c5..838088c93b 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp @@ -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]; diff --git a/Source/Plugins/Plugin_nJoy_SDL/Plugin_nJoy_SDL.vcproj b/Source/Plugins/Plugin_nJoy_SDL/Plugin_nJoy_SDL.vcproj index e7ebb69766..2a50ecafb4 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Plugin_nJoy_SDL.vcproj +++ b/Source/Plugins/Plugin_nJoy_SDL/Plugin_nJoy_SDL.vcproj @@ -1,7 +1,7 @@ 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(""); } } diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp index d4ae404180..143a56eb86 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp @@ -666,7 +666,7 @@ std::vector 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 diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h index f960fec7a6..999e94d80a 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h @@ -64,7 +64,6 @@ #ifdef _WIN32 #include - #define _CRT_SECURE_NO_WARNINGS #define DIRECTINPUT_VERSION 0x0800 #define WIN32_LEAN_AND_MEAN diff --git a/Source/Plugins/Plugin_nJoy_Testing/Plugin_nJoy_SDL_Test.vcproj b/Source/Plugins/Plugin_nJoy_Testing/Plugin_nJoy_SDL_Test.vcproj index 9498ba134a..efd42c4a45 100644 --- a/Source/Plugins/Plugin_nJoy_Testing/Plugin_nJoy_SDL_Test.vcproj +++ b/Source/Plugins/Plugin_nJoy_Testing/Plugin_nJoy_SDL_Test.vcproj @@ -1,7 +1,7 @@ #include -#define _CRT_SECURE_NO_WARNINGS #define DIRECTINPUT_VERSION 0x0800 #define WIN32_LEAN_AND_MEAN