From 39abe6a9a33f18e2d2f087080fabd81e25216941 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Wed, 29 Oct 2008 22:28:57 +0000 Subject: [PATCH] Fix the palette loading fix to not crash MP2 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1009 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/Core.cpp | 1 + Source/Core/Core/Src/HW/Memmap.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index aa1f35967c..dff3c11253 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -276,6 +276,7 @@ THREAD_RETURN EmuThread(void *pArg) VideoInitialize.pUpdateInterrupts = &(CommandProcessor::UpdateInterruptsFromVideoPlugin); VideoInitialize.pMemoryBase = Memory::base; VideoInitialize.pKeyPress = Callback_KeyPress; + VideoInitialize.bWii = _CoreParameter.bWii; PluginVideo::Video_Initialize(&VideoInitialize); // Under linux, this is an X11 Display, not an HWND! diff --git a/Source/Core/Core/Src/HW/Memmap.cpp b/Source/Core/Core/Src/HW/Memmap.cpp index a2155f0f2e..931e927e65 100644 --- a/Source/Core/Core/Src/HW/Memmap.cpp +++ b/Source/Core/Core/Src/HW/Memmap.cpp @@ -906,7 +906,10 @@ u8 *GetPointer(const u32 _Address) case 0xD1: case 0xD2: case 0xD3: - return (u8*)(((char*)m_pEXRAM) + (_Address&EXRAM_MASK)); + if (Core::GetStartupParameter().bWii) + return (u8*)(((char*)m_pEXRAM) + (_Address&EXRAM_MASK)); + else + return 0; case 0xE0: if (_Address < (0xE0000000 + L1_CACHE_SIZE))