From 0b6bf51c9a3620e207ce6482736dd9a58442c38a Mon Sep 17 00:00:00 2001 From: Marcus Wanners Date: Thu, 5 Mar 2009 02:11:37 +0000 Subject: [PATCH] Fixed a few compiler warnings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2555 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp | 4 ++-- Source/Plugins/Plugin_VideoDX9/Src/Render.cpp | 4 ++-- Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp b/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp index dc208d0b8d..26fd82082a 100644 --- a/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp +++ b/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp @@ -1158,7 +1158,7 @@ bool GCMemcard::format(bool New) bool GCMemcard::formatWIP(int slot, bool New, bool sjis) { u32 data_size = 0x2000 * (0x80 * 0x10 - 5); - u16 size = (((data_size / 0x2000) + 5) / 0x10); + u16 size = u16((((data_size / 0x2000) + 5) / 0x10)); SRAM m_SRAM; FILE * pStream; u64 time, rand; @@ -1189,7 +1189,7 @@ bool GCMemcard::formatWIP(int slot, bool New, bool sjis) // PanicAlert("m_SRAM.syssramex.flash_id %16x",(flash_id[i])); // PanicAlert("%16x",(flash_id[i]+(u32)rand)); // PanicAlert("%16x",(flash_id+Common::swap32((u32)rand))); - hdr.serial[i] = (flash_id[i]+(u32)rand); + hdr.serial[i] = u8((flash_id[i]+(u32)rand)); rand = (((rand*(u64)0x0000000041c64e6d)+(u64)0x0000000000003039)>>16); rand &= (u64)0x0000000000007fff; } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp index 38fb20fbcf..60d1495253 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp @@ -486,8 +486,8 @@ void UpdateViewport() vp.MinZ = (xfregs.rawViewport[5] - xfregs.rawViewport[2])/16777215.0f; vp.MaxZ = xfregs.rawViewport[5]/16777215.0f; - wid = ceil(fabs(2 * xfregs.rawViewport[0])); - hei = ceil(fabs(2 * xfregs.rawViewport[1])); + wid = int(ceil(fabs(2 * xfregs.rawViewport[0]))); + hei = int(ceil(fabs(2 * xfregs.rawViewport[1]))); vp.X = (int)(xfregs.rawViewport[3] - xfregs.rawViewport[0] - 342 - scissorXOff) + xoffs; vp.Y = (int)(xfregs.rawViewport[4] - xfregs.rawViewport[1] - 342 - scissorYOff) + yoffs; diff --git a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp index 086e76f75c..84f2c64fbb 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp @@ -152,8 +152,8 @@ void GetMousePos(float& x, float& y) PictureHeight = PictureHeight * Ratio; // Adjust the X and Y offset - XOffset = XOffset - (IncreasedWidth / 2.0); - YOffset = YOffset - (IncreasedHeight / 2.0); + XOffset = float(XOffset - (IncreasedWidth / 2.0)); + YOffset = float(YOffset - (IncreasedHeight / 2.0)); // Logging /*