GCAdapter: Exit early if the adapter fails to open on Android
This is only so that indentation is consistent with the non-android code.
This commit is contained in:
parent
749a4ad1ef
commit
0fa92694d1
|
@ -192,8 +192,15 @@ static void Read()
|
|||
|
||||
bool connected = env->CallStaticBooleanMethod(s_adapter_class, openadapter_func);
|
||||
|
||||
if (connected)
|
||||
if (!connected)
|
||||
{
|
||||
s_fd = 0;
|
||||
s_detected = false;
|
||||
|
||||
NOTICE_LOG_FMT(CONTROLLERINTERFACE, "GC Adapter failed to open!");
|
||||
return;
|
||||
}
|
||||
|
||||
s_write_adapter_thread_running.Set(true);
|
||||
s_write_adapter_thread = std::thread(Write);
|
||||
|
||||
|
@ -229,7 +236,6 @@ static void Read()
|
|||
s_write_happened.Set(); // Kick the waiting event
|
||||
write_adapter_thread.join();
|
||||
}
|
||||
}
|
||||
|
||||
s_fd = 0;
|
||||
s_detected = false;
|
||||
|
|
Loading…
Reference in New Issue