Add system time configuration (#4043)

* Add setting to switch between a fixed start time and the system time

Add clock settings to SDL

Make clock configureable in qt

Add a SharedPage handler class

Init shared_page_handler for tests
This commit is contained in:
Ben 2018-08-26 19:47:45 +02:00 committed by James Rowe
parent 13262c187c
commit b20607dfc6
16 changed files with 220 additions and 61 deletions

View file

@ -19,7 +19,6 @@ unsigned int Object::next_object_id;
/// Initialize the kernel
void Init(u32 system_mode) {
ConfigMem::Init();
SharedPage::Init();
Kernel::MemoryInit(system_mode);

View file

@ -11,11 +11,11 @@
#include "common/assert.h"
#include "common/common_types.h"
#include "common/logging/log.h"
#include "core/core.h"
#include "core/hle/config_mem.h"
#include "core/hle/kernel/memory.h"
#include "core/hle/kernel/vm_manager.h"
#include "core/hle/result.h"
#include "core/hle/shared_page.h"
#include "core/memory.h"
#include "core/memory_setup.h"
@ -160,11 +160,14 @@ void MapSharedPages(VMManager& address_space) {
.Unwrap();
address_space.Reprotect(cfg_mem_vma, VMAPermission::Read);
auto shared_page_vma = address_space
.MapBackingMemory(Memory::SHARED_PAGE_VADDR,
reinterpret_cast<u8*>(&SharedPage::shared_page),
Memory::SHARED_PAGE_SIZE, MemoryState::Shared)
.Unwrap();
auto shared_page_vma =
address_space
.MapBackingMemory(
Memory::SHARED_PAGE_VADDR,
reinterpret_cast<u8*>(
&Core::System::GetInstance().GetSharedPageHandler()->GetSharedPage()),
Memory::SHARED_PAGE_SIZE, MemoryState::Shared)
.Unwrap();
address_space.Reprotect(shared_page_vma, VMAPermission::Read);
}