Makeing LLE-testing threads work with common::thread

still getting a deadlock somewhere...


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2786 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-03-29 09:35:40 +00:00
parent cc14b50aba
commit 2e748b4544
2 changed files with 8 additions and 21 deletions

View File

@ -37,11 +37,6 @@
#define NULL 0
#endif
#ifndef _WIN32
#undef WITH_DSP_ON_THREAD
//TODO FIX
#endif
const char* reg_names[] =
{
// a0
@ -67,7 +62,7 @@ const char* reg_names[] =
void gdsp_dma();
#ifdef WITH_DSP_ON_THREAD
#if WITH_DSP_ON_THREAD
Common::CriticalSection g_CriticalSection;
#endif

View File

@ -44,7 +44,7 @@
PLUGIN_GLOBALS* globals = NULL;
DSPInitialize g_dspInitialize;
Common::Thread *g_hDSPThread;
SoundStream *soundStream = NULL;
@ -143,12 +143,8 @@ void DllDebugger(HWND _hParent, bool Show)
}
/*// Regular thread
#ifdef _WIN32
DWORD WINAPI dsp_thread(LPVOID lpParameter)
#else
// Regular thread
void* dsp_thread(void* lpParameter)
#endif
{
while (1)
{
@ -161,11 +157,7 @@ void* dsp_thread(void* lpParameter)
}
// Debug thread
#ifdef _WIN32
DWORD WINAPI dsp_thread_debug(LPVOID lpParameter)
#else
void* dsp_thread_debug(void* lpParameter)
#endif
{
#ifdef _WIN32
@ -187,7 +179,6 @@ void* dsp_thread_debug(void* lpParameter)
return NULL;
}
*/
void DSP_DebugBreak()
{
#ifdef _WIN32
@ -238,6 +229,7 @@ void Initialize(void *init)
fclose(t);
}
*/
g_hDSPThread = new Common::Thread(dsp_thread, NULL);
soundStream = AudioCommon::InitSoundStream(g_Config.sBackend);
@ -246,6 +238,8 @@ void Initialize(void *init)
void DSP_StopSoundStream()
{
delete g_hDSPThread;
g_hDSPThread = NULL;
}
void Shutdown(void)
@ -340,12 +334,10 @@ void DSP_WriteMailboxLow(bool _CPUMailbox, u16 _uLowMail)
void DSP_Update(int cycles)
{
#ifdef _WIN32
#ifdef _WIN32
if (g_Dialog.CanDoStep())
{
#endif
gdsp_runx(100); // cycles
}
#endif
}