diff --git a/Source/Core/Core/Src/HW/EXI.cpp b/Source/Core/Core/Src/HW/EXI.cpp index 111ef7c00e..e1baf353e7 100644 --- a/Source/Core/Core/Src/HW/EXI.cpp +++ b/Source/Core/Core/Src/HW/EXI.cpp @@ -44,6 +44,7 @@ void Init() g_Channels[0].AddDevice(EXIDEVICE_MEMORYCARD_A, 0); g_Channels[0].AddDevice(EXIDEVICE_IPL, 1); g_Channels[1].AddDevice(EXIDEVICE_MEMORYCARD_B, 0); + //g_Channels[1].AddDevice(EXIDEVICE_MIC, 0); g_Channels[2].AddDevice(EXIDEVICE_AD16, 0); } diff --git a/Source/Core/Core/Src/HW/EXI_Device.cpp b/Source/Core/Core/Src/HW/EXI_Device.cpp index 9e84a69725..b681d944b1 100644 --- a/Source/Core/Core/Src/HW/EXI_Device.cpp +++ b/Source/Core/Core/Src/HW/EXI_Device.cpp @@ -21,6 +21,7 @@ #include "EXI_DeviceIPL.h" #include "EXI_DeviceMemoryCard.h" #include "EXI_DeviceAD16.h" +#include "EXI_DeviceMic.h" #include "../Core.h" @@ -143,6 +144,10 @@ IEXIDevice* EXIDevice_Create(TEXIDevices _EXIDevice) case EXIDEVICE_AD16: return new CEXIAD16(); break; + + case EXIDEVICE_MIC: + return new CEXIMic(1); + break; } return NULL; } diff --git a/Source/Core/Core/Src/HW/EXI_Device.h b/Source/Core/Core/Src/HW/EXI_Device.h index d1e9c51c31..e929209d19 100644 --- a/Source/Core/Core/Src/HW/EXI_Device.h +++ b/Source/Core/Core/Src/HW/EXI_Device.h @@ -54,6 +54,7 @@ enum TEXIDevices EXIDEVICE_MEMORYCARD_B, EXIDEVICE_IPL, EXIDEVICE_AD16, + EXIDEVICE_MIC, }; extern IEXIDevice* EXIDevice_Create(TEXIDevices _EXIDevice); diff --git a/Source/Core/Core/Src/SConscript b/Source/Core/Core/Src/SConscript index 501341e7ce..27ac56c9e8 100644 --- a/Source/Core/Core/Src/SConscript +++ b/Source/Core/Core/Src/SConscript @@ -35,6 +35,7 @@ files = ["Console.cpp", "HW/EXI_DeviceIPL.cpp", "HW/EXI_DeviceAD16.cpp", "HW/EXI_DeviceMemoryCard.cpp", + "HW/EXI_DeviceMic.cpp", "HW/GPFifo.cpp", "HW/HW.cpp", "HW/Memmap.cpp", diff --git a/Source/Core/Core/Src/VolumeHandler.cpp b/Source/Core/Core/Src/VolumeHandler.cpp index 85f88db4b9..e26607c1fc 100644 --- a/Source/Core/Core/Src/VolumeHandler.cpp +++ b/Source/Core/Core/Src/VolumeHandler.cpp @@ -31,8 +31,15 @@ void SetVolumeName(const std::string& _rFullPath) { if (g_pVolume) { - delete g_pVolume; - g_pVolume = NULL; + try + { + delete g_pVolume; + g_pVolume = NULL; + } + catch() + { + printf("Couldn't Delete g_pVolume and set it to Null!\n"); + } } g_pVolume = DiscIO::CreateVolumeFromFilename(_rFullPath); diff --git a/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp b/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp index e1f1e1e20f..7e88805507 100644 --- a/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp +++ b/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp @@ -639,7 +639,7 @@ u32 GCMemcard::ImportGci(const char *fileName, const char *fileName2) { if (!mcdFile && !fileName2) return 0; - FILE *gci = fopen(_T(fileName), _T("rb")); + FILE *gci = fopen(fileName, "rb"); if (!gci) return 0; enum @@ -739,7 +739,7 @@ u32 GCMemcard::ImportGci(const char *fileName, const char *fileName2) u32 ret = 0; if(fileName2) { - FILE * gci2 = fopen(_T(fileName2), _T("wb")); + FILE * gci2 = fopen(fileName2, "wb"); if (!gci2) return 0; fseek(gci2, 0, SEEK_SET); fwrite(d, 1, 0x40, gci2); @@ -759,7 +759,7 @@ u32 GCMemcard::ImportGci(const char *fileName, const char *fileName2) bool GCMemcard::ExportGci(u32 index, const char *fileName) { - FILE *gci = fopen(_T(fileName), _T("wb")); + FILE *gci = fopen(fileName, "wb"); if(!gci) return false; fseek(gci, 0, SEEK_SET);