3DS - Fix hang on shutdown
This commit is contained in:
parent
c50155b1b0
commit
e732534e91
2 changed files with 13 additions and 1 deletions
|
@ -91,7 +91,7 @@ bool Backend_SystemTask(bool active)
|
|||
{
|
||||
(void)active;
|
||||
|
||||
return aptMainLoop();
|
||||
return true;
|
||||
}
|
||||
|
||||
void Backend_GetKeyboardState(bool *keyboard_state)
|
||||
|
|
12
src/Draw.cpp
12
src/Draw.cpp
|
@ -6,6 +6,10 @@
|
|||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
#ifdef _3DS
|
||||
#include <3ds.h>
|
||||
#endif
|
||||
|
||||
#include "WindowsWrapper.h"
|
||||
|
||||
#include "Backends/Misc.h"
|
||||
|
@ -76,6 +80,14 @@ BOOL Flip_SystemTask(void)
|
|||
|
||||
RenderBackend_DrawScreen();
|
||||
|
||||
#ifdef _3DS
|
||||
// This would go in Backend_SystemTask, but that causes a hang
|
||||
// because of a race condition: aptMainLoop cannot be called
|
||||
// between C3D_FrameBegin and C3D_FrameEnd
|
||||
if (!aptMainLoop())
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if (RestoreSurfaces())
|
||||
{
|
||||
RestoreStripper();
|
||||
|
|
Loading…
Add table
Reference in a new issue