mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-20 18:59:26 +02: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:
parent
372bdfccbc
commit
3fd6eeaf9f
13 changed files with 418 additions and 396 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue