mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
Android: Fix ANR when boot fails
This commit is contained in:
parent
897f2dadf8
commit
423054e8ac
|
@ -194,7 +194,9 @@ void AndroidHostInterface::PauseEmulationThread(bool paused)
|
||||||
|
|
||||||
void AndroidHostInterface::StopEmulationThread()
|
void AndroidHostInterface::StopEmulationThread()
|
||||||
{
|
{
|
||||||
Assert(IsEmulationThreadRunning());
|
if (!IsEmulationThreadRunning())
|
||||||
|
return;
|
||||||
|
|
||||||
Log_InfoPrint("Stopping emulation thread...");
|
Log_InfoPrint("Stopping emulation thread...");
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(m_mutex);
|
std::unique_lock<std::mutex> lock(m_mutex);
|
||||||
|
|
|
@ -100,6 +100,7 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
|
||||||
|
|
||||||
public void onEmulationStopped() {
|
public void onEmulationStopped() {
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
|
AndroidHostInterface.getInstance().stopEmulationThread();
|
||||||
if (!mWasDestroyed)
|
if (!mWasDestroyed)
|
||||||
finish();
|
finish();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue