diff options
| author | bunnei <bunneidev@gmail.com> | 2019-03-18 22:17:12 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2019-03-20 22:36:03 -0400 |
| commit | bf018302587bf51b5b6cd088b3e5b666384626ce (patch) | |
| tree | 3578822fba96932f0f1e95111a9cda19de3b9ead /src/core/memory.cpp | |
| parent | a0b5ed6846eb218345da1d87410cddbfb43bc3ab (diff) | |
memory: Check that core is powered on before attempting to use GPU.
- GPU will be released on shutdown, before pages are unmapped.
- On subsequent runs, current_page_table will be not nullptr, but GPU might not be valid yet.
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 365ac82b4a..332c1037c2 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -48,7 +48,7 @@ static void MapPages(Common::PageTable& page_table, VAddr base, u64 size, u8* me (base + size) * PAGE_SIZE); // During boot, current_page_table might not be set yet, in which case we need not flush - if (current_page_table) { + if (Core::System::GetInstance().IsPoweredOn()) { Core::System::GetInstance().GPU().FlushAndInvalidateRegion(base << PAGE_BITS, size * PAGE_SIZE); } |
