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()
|
||||
{
|
||||
Assert(IsEmulationThreadRunning());
|
||||
if (!IsEmulationThreadRunning())
|
||||
return;
|
||||
|
||||
Log_InfoPrint("Stopping emulation thread...");
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
|
|
|
@ -100,6 +100,7 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
|
|||
|
||||
public void onEmulationStopped() {
|
||||
runOnUiThread(() -> {
|
||||
AndroidHostInterface.getInstance().stopEmulationThread();
|
||||
if (!mWasDestroyed)
|
||||
finish();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue