From a23fb0eef32023ddfcf6ffe580eefb85dae79d9e Mon Sep 17 00:00:00 2001 From: Nolan Check Date: Tue, 8 Mar 2011 02:23:54 +0000 Subject: [PATCH] Fix a couple apparent typos. a) Don't pass ASCII string to Unicode function. b) If you type "(128 / 1000)" in C++, it will be treated as "0" because the integer division gets truncated. Fixed. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7318 8ced0084-cf51-0410-be5f-012b33b47a6e --- Externals/CLRun/clrun/dynamiclib.c | 2 +- Source/Core/Core/Src/HW/DVDInterface.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Externals/CLRun/clrun/dynamiclib.c b/Externals/CLRun/clrun/dynamiclib.c index ea51239a33..368d262ed1 100644 --- a/Externals/CLRun/clrun/dynamiclib.c +++ b/Externals/CLRun/clrun/dynamiclib.c @@ -16,7 +16,7 @@ int loadLib(const char *filename) { return -2; #ifdef _WIN32 - library = LoadLibrary(filename); + library = LoadLibraryA(filename); #else library = dlopen(filename, RTLD_NOW | RTLD_LOCAL); #endif diff --git a/Source/Core/Core/Src/HW/DVDInterface.cpp b/Source/Core/Core/Src/HW/DVDInterface.cpp index c9594b13bd..cea7486426 100644 --- a/Source/Core/Core/Src/HW/DVDInterface.cpp +++ b/Source/Core/Core/Src/HW/DVDInterface.cpp @@ -30,11 +30,11 @@ #include "../VolumeHandler.h" // Disc transfer rate measured in bytes per second -#define DISC_TRANSFER_RATE_GC (3125 * 1024) -#define DISC_TRANSFER_RATE_WII (7926 * 1024) +static const u32 DISC_TRANSFER_RATE_GC = 3125 * 1024; +static const u32 DISC_TRANSFER_RATE_WII = 7926 * 1024; -// Disc access time measured in seconds -#define DISC_ACCESS_TIME (128 / 1000) +// Disc access time measured in milliseconds +static const u32 DISC_ACCESS_TIME_MS = 128; namespace DVDInterface { @@ -466,7 +466,7 @@ void Write32(const u32 _iValue, const u32 _iAddress) { u64 ticksUntilTC = m_DILENGTH.Length * (SystemTimers::GetTicksPerSecond() / (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii?DISC_TRANSFER_RATE_WII:DISC_TRANSFER_RATE_GC)) + - (SystemTimers::GetTicksPerSecond() * DISC_ACCESS_TIME); + (SystemTimers::GetTicksPerSecond() * DISC_ACCESS_TIME_MS / 1000); CoreTiming::ScheduleEvent((int)ticksUntilTC, tc); } else