mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Some fixes to Stop() process.
Unbreak linux stop on Single Core, remove an unnecessary wait event, fix DSP HLE/DSP LLE/OGL plugin hang on stop when the config dialog has been opened (nJoy and Wiimote still need to be fixed), avoid the CpuThread to be stuck in the efb/swap loop by setting a flag before the thread is actually shutdown (contrary to r4756 which was setting it.. after :D) Clear the status bar Framerate/Core message when the game is stopped. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4769 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -68,7 +68,9 @@ PLUGIN_GLOBALS* globals = NULL;
|
||||
bool s_initialized;
|
||||
|
||||
static u32 s_efbAccessRequested = FALSE;
|
||||
static u32 s_FifoShuttingDown = FALSE;
|
||||
static bool s_swapRequested = false;
|
||||
|
||||
static volatile struct
|
||||
{
|
||||
u32 xfbAddr;
|
||||
@ -261,6 +263,10 @@ void Initialize(void *init)
|
||||
|
||||
void Video_Prepare()
|
||||
{
|
||||
// Better be safe...
|
||||
s_efbAccessRequested = FALSE;
|
||||
s_FifoShuttingDown = FALSE;
|
||||
|
||||
Renderer::Init();
|
||||
TextureCache::Init();
|
||||
BPInit();
|
||||
@ -279,6 +285,7 @@ void Video_Prepare()
|
||||
void Shutdown()
|
||||
{
|
||||
s_efbAccessRequested = FALSE;
|
||||
s_FifoShuttingDown = FALSE;
|
||||
|
||||
Fifo_Shutdown();
|
||||
VertexManager::Shutdown();
|
||||
@ -311,6 +318,8 @@ void Video_EnterLoop()
|
||||
void Video_ExitLoop()
|
||||
{
|
||||
Fifo_ExitLoop();
|
||||
|
||||
s_FifoShuttingDown = TRUE;
|
||||
}
|
||||
|
||||
void Video_SetRendering(bool bEnabled) {
|
||||
@ -451,7 +460,7 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y)
|
||||
|
||||
if (g_VideoInitialize.bOnThread)
|
||||
{
|
||||
while (Common::AtomicLoadAcquire(s_efbAccessRequested) && s_initialized)
|
||||
while (Common::AtomicLoadAcquire(s_efbAccessRequested) && !s_FifoShuttingDown)
|
||||
Common::YieldCPU();
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user