mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-18 06:10:35 +00:00
3970 revert fixes crash caused by scheduler 4177 fix mario galaxy and metroid prime 4 not booting Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4187 Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
@@ -277,17 +277,7 @@ private:
|
||||
state.store(State::Processing);
|
||||
evt_processing->Signal(system.Kernel());
|
||||
|
||||
worker = std::thread([this]() {
|
||||
using namespace std::chrono_literals;
|
||||
scan_results = Network::ScanWifiNetworks(3s);
|
||||
{
|
||||
std::scoped_lock lk{g_scan_mtx};
|
||||
g_last_scan_results = scan_results;
|
||||
}
|
||||
// choose result code
|
||||
const bool ok = !scan_results.empty();
|
||||
Finish(ok ? ResultSuccess : ResultPendingConnection);
|
||||
});
|
||||
worker = std::thread(&IScanRequest::WorkerThread, this);
|
||||
IPC::ResponseBuilder{ctx, 2}.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
@@ -318,6 +308,21 @@ private:
|
||||
|
||||
enum class State { Idle, Processing, Finished };
|
||||
|
||||
void WorkerThread() {
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
scan_results = Network::ScanWifiNetworks(3s);
|
||||
|
||||
{
|
||||
std::scoped_lock lk{g_scan_mtx};
|
||||
g_last_scan_results = scan_results;
|
||||
}
|
||||
|
||||
// choose result code
|
||||
const bool ok = !scan_results.empty();
|
||||
Finish(ok ? ResultSuccess : ResultPendingConnection);
|
||||
}
|
||||
|
||||
void Finish(Result rc) {
|
||||
worker_result.store(rc);
|
||||
state.store(State::Finished);
|
||||
|
||||
Reference in New Issue
Block a user