Skip to content

Commit

Permalink
Merge branch 'master' into wii-usb
Browse files Browse the repository at this point in the history
  • Loading branch information
Parlane committed Nov 14, 2012
2 parents d8b879a + e4d18e3 commit b01489b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
20 changes: 14 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ cmake_minimum_required(VERSION 2.6)
# Update compiler before calling project()
if (APPLE)
# Use clang compiler
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang")
set(CMAKE_CXX_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++")
if (NOT EXISTS "${CMAKE_CXX_COMPILER}")
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
endif()
endif()
project(dolphin-emu)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)
Expand Down Expand Up @@ -122,6 +126,10 @@ if(UNIX AND NOT APPLE)
endif()

if(APPLE)
# Ignore MacPorts and Fink and any other locally installed packages that
# might prevent building a distributable binary.
set(CMAKE_SYSTEM_PREFIX_PATH /usr)
set(ENV{PATH} /usr/bin:/bin:/usr/sbin:/sbin)

# Some of our code contains Objective C constructs.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c")
Expand All @@ -136,7 +144,7 @@ if(APPLE)
# This is inserted into the Info.plist as well.
# Note that the SDK determines the maximum version of which optional
# features can be used, not the minimum required version to run.
set(OSX_MIN_VERSION "10.6")
set(OSX_MIN_VERSION "10.5.4")
set(TARGET_FLAGS "${TARGET_FLAGS} -mmacosx-version-min=${OSX_MIN_VERSION}")
set(SYSROOT_LEGACY_PATH "/Developer/SDKs/MacOSX10.6.sdk")
set(SYSROOT_PATH "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk")
Expand All @@ -145,9 +153,9 @@ if(APPLE)
elseif(EXISTS "${SYSROOT_LEGACY_PATH}/")
set(TARGET_SYSROOT ${SYSROOT_LEGACY_PATH})
endif()
if(TARGET_SYSROOT)
if(${TARGET_SYSROOT})
set(TARGET_FLAGS "${TARGET_FLAGS} -isysroot ${TARGET_SYSROOT}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mmacosx-version-min=${OSX_MIN_VERSION} -Wl,-syslibroot,${TARGET_SYSROOT}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-syslibroot,${TARGET_SYSROOT}")
endif()
# Do not warn about frameworks that are not available on all architectures.
# This avoids a warning when linking with QuickTime.
Expand Down Expand Up @@ -480,7 +488,7 @@ endif()
option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF)
if(NOT DISABLE_WX)
include(FindwxWidgets OPTIONAL)
FIND_PACKAGE(wxWidgets COMPONENTS core aui adv gl)
FIND_PACKAGE(wxWidgets COMPONENTS core aui adv)

if(wxWidgets_FOUND)
EXECUTE_PROCESS(
Expand Down
20 changes: 18 additions & 2 deletions Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize)
if (!ReadPB(blockAddr, PB))
break;

ProcessUpdates(PB);

if (m_CRC != 0x3389a79e)
VoiceHacks(PB);

Expand Down Expand Up @@ -335,6 +333,24 @@ bool CUCode_AX::AXTask(u32& _uMail)
PBaddr[numPBaddr] = HLEMemory_Read_U32(uAddress);
numPBaddr++;

// HACK: process updates right now instead of waiting until
// Premix is called. Some games using sequenced music (Tales of
// Symphonia for example) thought PBs were unused because we
// were too slow to update them and set them as running. This
// happens because Premix is basically completely desync-ed
// from the emulation core (it's running in the audio thread).
// Fixing this would require rewriting most of the AX HLE.
u32 block_addr = uAddress;
AXPB pb;
for (int i = 0; block_addr && i < NUMBER_OF_PBS; i++)
{
if (!ReadPB(block_addr, pb))
break;
ProcessUpdates(pb);
WritePB(block_addr, pb);
block_addr = (pb.next_pb_hi << 16) | pb.next_pb_lo;
}

m_addressPBs = HLEMemory_Read_U32(uAddress); // left in for now
uAddress += 4;
soundStream->GetMixer()->SetHLEReady(true);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/Movie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void Init()
g_bFrameStep = false;
g_bFrameStop = false;
bSaveConfig = false;

iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore;
if (IsPlayingInput())
{
ReadHeader();
Expand Down

0 comments on commit b01489b

Please sign in to comment.