mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 09:09:04 +00:00
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
1 changed files with 36 additions and 30 deletions
|
@ -192,8 +192,15 @@ static void Read()
|
||||||
|
|
||||||
bool connected = env->CallStaticBooleanMethod(s_adapter_class, openadapter_func);
|
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_running.Set(true);
|
||||||
s_write_adapter_thread = std::thread(Write);
|
s_write_adapter_thread = std::thread(Write);
|
||||||
|
|
||||||
|
@ -229,7 +236,6 @@ static void Read()
|
||||||
s_write_happened.Set(); // Kick the waiting event
|
s_write_happened.Set(); // Kick the waiting event
|
||||||
write_adapter_thread.join();
|
write_adapter_thread.join();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
s_fd = 0;
|
s_fd = 0;
|
||||||
s_detected = false;
|
s_detected = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue