mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
warning fixes
(may break sound on wii, look in the changelog of Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp if you wish to know why) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1306 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -376,14 +376,14 @@ int ChooseStringFrom(const char* str, const char* * items)
|
||||
// Thousand separator. Turns 12345678 into 12,345,678.
|
||||
std::string ThS(int a, bool b)
|
||||
{
|
||||
char cbuf[20]; int j = 0;
|
||||
char cbuf[20];
|
||||
|
||||
// determine treatment of signed or unsigned
|
||||
if(b) sprintf(cbuf, "%u", a); else sprintf(cbuf, "%i", a);
|
||||
|
||||
|
||||
std::string sbuf = cbuf;
|
||||
for (int i = 0; i < sbuf.length(); ++i)
|
||||
for (u32 i = 0; i < sbuf.length(); ++i)
|
||||
{
|
||||
if((i & 3) == 3)
|
||||
{
|
||||
|
@ -58,13 +58,15 @@ bool WaveFileWriter::Start(const char *filename)
|
||||
// We are now at offset 44
|
||||
if (ftell(file) != 44)
|
||||
PanicAlert("wrong offset: %i", ftell(file));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void WaveFileWriter::Stop()
|
||||
{
|
||||
if (!file)
|
||||
return;
|
||||
u32 file_size = (u32)ftell(file);
|
||||
// u32 file_size = (u32)ftell(file);
|
||||
fseek(file, 4, SEEK_SET);
|
||||
Write(audio_size + 36);
|
||||
fseek(file, 40, SEEK_SET);
|
||||
@ -118,4 +120,4 @@ void WaveFileWriter::AddStereoSamplesBE(const short *sample_data, int count)
|
||||
}
|
||||
fwrite(conv_buffer, count * 4, 1, file);
|
||||
audio_size += count * 4;
|
||||
}
|
||||
}
|
||||
|
@ -560,11 +560,10 @@ void Callback_PADLog(const TCHAR* _szMessage)
|
||||
//std::string Callback_ISOName(void)
|
||||
char * Callback_ISOName(void)
|
||||
{
|
||||
char * a = "";
|
||||
if(g_CoreStartupParameter.m_strName.length() > 0)
|
||||
return (char *)g_CoreStartupParameter.m_strName.c_str();
|
||||
else
|
||||
return a;
|
||||
return (char *)"";
|
||||
}
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
|
@ -151,11 +151,13 @@ IEXIDevice* EXIDevice_Create(TEXIDevices _EXIDevice)
|
||||
case EXIDEVICE_MIC:
|
||||
return new CEXIMic(1);
|
||||
break;
|
||||
#if 0
|
||||
|
||||
case EXIDEVICE_ETH:
|
||||
#if 0
|
||||
return new CEXIETHERNET();
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -49,7 +49,6 @@ void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile
|
||||
return;
|
||||
|
||||
Patch currentPatch;
|
||||
int index = 0;
|
||||
|
||||
for (std::vector<std::string>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter)
|
||||
{
|
||||
|
@ -134,6 +134,8 @@ bool LoadPlugin(const char *_Filename)
|
||||
//PanicAlert("return false: %i", ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
// ============
|
||||
|
||||
|
@ -145,13 +145,13 @@ void CMemoryWindow::SetMemoryValue(wxCommandEvent& event)
|
||||
u32 val;
|
||||
|
||||
if (!TryParseUInt(std::string("0x") + str_addr, &addr)) {
|
||||
PanicAlert("Invalid Address: %s", str_addr);
|
||||
return;
|
||||
PanicAlert("Invalid Address: %s", str_addr.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TryParseUInt(std::string("0x") + str_val, &val)) {
|
||||
PanicAlert("Invalid Value: %s", str_val);
|
||||
return;
|
||||
PanicAlert("Invalid Value: %s", str_val.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Memory::Write_U32(val, addr);
|
||||
|
@ -101,7 +101,7 @@ CBannerLoaderWii::StupidWideCharToString(u16* _pSrc, size_t _max)
|
||||
{
|
||||
std::string temp;
|
||||
|
||||
int offset = 0;
|
||||
u32 offset = 0;
|
||||
while (_pSrc[offset] != 0x0000)
|
||||
{
|
||||
temp += (char)(_pSrc[offset] >> 8);
|
||||
|
@ -432,7 +432,7 @@ void CISOProperties::OnBannerImageSave(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
wxString dirHome;
|
||||
|
||||
wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format(_("%s.png"), m_GameID->GetLabel()),
|
||||
wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format(_("%s.png"), m_GameID->GetLabel().c_str()),
|
||||
_("*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize);
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
|
@ -100,8 +100,8 @@ void ConvertToXFB(u32 *dst, const u8* _pEFB, int width, int height)
|
||||
if (((size_t)dst & 0xF) != 0) {
|
||||
PanicAlert("ConvertToXFB - unaligned XFB");
|
||||
}
|
||||
__m128i zero = _mm_setzero_si128();
|
||||
for (int i = 0; i < numBlocks; i++)
|
||||
|
||||
for (u32 i = 0; i < numBlocks; i++)
|
||||
{
|
||||
__m128i yuyv0 = _mm_srai_epi32(
|
||||
_mm_add_epi32(
|
||||
|
Reference in New Issue
Block a user