Fix Linux Building, Add failsafe check in volume deleting. Also started work on Microphone emulation, base work from Mem card. Just enough to make Odama think I have a Microphone in currently. It must be waiting for me to press the button on the Mic to continue to start, although I can wait through the intro and then use controller, is a pain though. More to come

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@870 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1 2008-10-15 04:23:02 +00:00
parent f417aac20b
commit 6fe6fd0b4c
6 changed files with 20 additions and 5 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -54,6 +54,7 @@ enum TEXIDevices
EXIDEVICE_MEMORYCARD_B,
EXIDEVICE_IPL,
EXIDEVICE_AD16,
EXIDEVICE_MIC,
};
extern IEXIDevice* EXIDevice_Create(TEXIDevices _EXIDevice);

View File

@ -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",

View File

@ -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);

View File

@ -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);