Suggestions
This commit is contained in:
@@ -345,7 +345,7 @@ public:
|
||||
main_thread_extended_sleep = requires_sleep;
|
||||
}
|
||||
|
||||
bool GetAppMainThreadExtendedSleep() {
|
||||
bool GetAppMainThreadExtendedSleep() const {
|
||||
return main_thread_extended_sleep;
|
||||
}
|
||||
|
||||
@@ -397,6 +397,12 @@ private:
|
||||
*/
|
||||
std::recursive_mutex hle_lock;
|
||||
|
||||
/*
|
||||
* Flags non system module main threads to wait a bit before running. On real hardware,
|
||||
* system modules have plenty of time to load before the game is loaded, but on citra they
|
||||
* start at the same time as the game. The artificial wait gives system modules some time
|
||||
* to load and setup themselves before the game starts.
|
||||
*/
|
||||
bool main_thread_extended_sleep = false;
|
||||
|
||||
friend class boost::serialization::access;
|
||||
|
@@ -420,10 +420,8 @@ std::shared_ptr<Thread> SetupMainThread(KernelSystem& kernel, u32 entry_point, u
|
||||
const bool is_lle_service =
|
||||
static_cast<u32>(owner_process->codeset->program_id >> 32) == system_module_tid_high;
|
||||
|
||||
s64 sleep_base_time_ns;
|
||||
if (is_lle_service || !Settings::values.delay_main_thread_start) {
|
||||
sleep_base_time_ns = 0;
|
||||
} else {
|
||||
s64 sleep_base_time_ns = 0;
|
||||
if (!is_lle_service && Settings::values.delay_main_thread_start) {
|
||||
if (kernel.GetAppMainThreadExtendedSleep()) {
|
||||
sleep_base_time_ns = sleep_app_thread_base_ns;
|
||||
kernel.SetAppMainThreadExtendedSleep(false);
|
||||
|
Reference in New Issue
Block a user