early-access version 2535
This commit is contained in:
@@ -326,7 +326,9 @@ struct System::Impl {
|
||||
is_powered_on = false;
|
||||
exit_lock = false;
|
||||
|
||||
gpu_core->NotifyShutdown();
|
||||
if (gpu_core != nullptr) {
|
||||
gpu_core->NotifyShutdown();
|
||||
}
|
||||
|
||||
services.reset();
|
||||
service_manager.reset();
|
||||
|
@@ -42,11 +42,20 @@ public:
|
||||
context.MakeCurrent();
|
||||
}
|
||||
~Scoped() {
|
||||
context.DoneCurrent();
|
||||
if (active) {
|
||||
context.DoneCurrent();
|
||||
}
|
||||
}
|
||||
|
||||
/// In the event that context was destroyed before the Scoped is destroyed, this provides a
|
||||
/// mechanism to prevent calling a destroyed object's method during the deconstructor
|
||||
void Cancel() {
|
||||
active = false;
|
||||
}
|
||||
|
||||
private:
|
||||
GraphicsContext& context;
|
||||
bool active{true};
|
||||
};
|
||||
|
||||
/// Calls MakeCurrent on the context and calls DoneCurrent when the scope for the returned value
|
||||
|
@@ -312,7 +312,7 @@ public:
|
||||
size = Common::AlignUp(size, Kernel::PageSize);
|
||||
size += page_table.GetNumGuardPages() * Kernel::PageSize * 4;
|
||||
|
||||
auto is_region_available = [&](VAddr addr) {
|
||||
const auto is_region_available = [&](VAddr addr) {
|
||||
const auto end_addr = addr + size;
|
||||
while (addr < end_addr) {
|
||||
if (system.Memory().IsValidVirtualAddress(addr)) {
|
||||
|
Reference in New Issue
Block a user