From 47135170d8be495cf9bbeb5b8549fd4b928a67d6 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Thu, 19 May 2011 14:26:03 +0000 Subject: [PATCH] Fix the cmake build for natty to find the glib libraries properly. Yuck! Fix a few minor compiler warnings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7551 8ced0084-cf51-0410-be5f-012b33b47a6e --- CMakeLists.txt | 9 +++++++-- .../Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp | 2 +- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp | 7 ++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7524a7c90..7b6f2cfb77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -382,9 +382,14 @@ if(NOT DISABLE_WX) # There is a bug in the FindGTK module in cmake version 2.8.2 that # does not find gdk-pixbuf-2.0. On the other hand some 2.8.3 # users have complained that pkg-config does not find - # gdk-pixbuf-2.0 + # gdk-pixbuf-2.0. On yet another hand, cmake version 2.8.3 in + # Ubuntu Natty does not find the glib libraries correctly. + # Ugly!!! + execute_process(COMMAND lsb_release -c -s + OUTPUT_VARIABLE DIST_NAME + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} - VERSION_EQUAL 2.8.2) + VERSION_EQUAL 2.8.2 OR "${DIST_NAME}" STREQUAL "natty") check_lib(GTK2 gtk+-2.0 gtk.h REQUIRED) else() include(FindGTK2) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp index 27df17956d..59e53cd242 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp @@ -53,7 +53,7 @@ void HLE_IPC_CreateVirtualFATFilesystem() { const int cdbSize = 0x01400000; const std::string cdbPath = Common::GetTitleDataPath(TITLEID_SYSMENU) + "cdb.vff"; - if (File::GetSize(cdbPath) < cdbSize) + if ((int)File::GetSize(cdbPath) < cdbSize) { // cdb.vff is a virtual Fat filesystem created on first launch of sysmenu // we create it here as it is faster ~3 minutes for me when sysmenu does it ~1 second created here diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp index 4fec5dabba..cba8274347 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp @@ -447,7 +447,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) u32 retVal = 0; const DiscIO::INANDContentLoader& Loader = AccessContentDevice(TitleID); - u32 ViewCount = ViewCount = Loader.GetTIKSize() / DiscIO::INANDContentLoader::TICKET_SIZE; + u32 ViewCount = Loader.GetTIKSize() / DiscIO::INANDContentLoader::TICKET_SIZE; if (!ViewCount) { @@ -536,12 +536,13 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) _dbg_assert_msg_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 1, "IOCTL_ES_GETTMDVIEWCNT no out buffer"); u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address); - u32 TitleID_HI = (u32)(TitleID >> 32); const DiscIO::INANDContentLoader& Loader = AccessContentDevice(TitleID); // Assert if title is not a disc title and the loader is not valid - _dbg_assert_msg_(WII_IPC_ES, (TitleID_HI == 0x00010000) || (TitleID_HI == 0x00010004) || Loader.IsValid(), "Loader not valid for TitleID %08x/%08x", TitleID_HI, (u32)TitleID); + _dbg_assert_msg_(WII_IPC_ES, ((u32)(TitleID >> 32) == 0x00010000) || + ((u32)(TitleID >> 32) == 0x00010004) || Loader.IsValid(), + "Loader not valid for TitleID %08x/%08x", (u32)(TitleID >> 32), (u32)TitleID); u32 TMDViewCnt = 0; if (Loader.IsValid())