mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user