Frontend PR fixes (#6378)

* citra_qt: Check if renderer is null

* core: Fix dynarmic use-after-free error

* bootmanager: Add current context check in DoneCurrent

* Loading a save state would destroy the frame dumper class, which contains a shared context. That context would call DoneCurrent without checking if it was actually bound or not, resulting in crashes when calling opengl functions

* externals: Correct glad readme

* common: Log renderer debug setting

* citra: Make lambda lower case

* Consistency with review comments on the PR

* video_core: Kill more global state

* GetResolutionScaleFactor would be called somewhere in the renderer constructor chain but it relies on the yet unitialized g_renderer, resulting in crashes when the resolution scale is set to auto. Rather than adding a workaround, let's kill this global state to fix this for good
This commit is contained in:
GPUCode 2023-03-30 14:24:49 +03:00 committed by GitHub
parent 5346ca27b5
commit ffc95eb59b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 102 additions and 93 deletions

View file

@ -4,6 +4,7 @@
#pragma once
#include <atomic>
#include <memory>
#include <mutex>
#include <string>
@ -151,10 +152,7 @@ public:
* @returns True if the emulated system is powered on, otherwise false.
*/
[[nodiscard]] bool IsPoweredOn() const {
return cpu_cores.size() > 0 &&
std::all_of(cpu_cores.begin(), cpu_cores.end(),
[](std::shared_ptr<ARM_Interface> ptr) { return ptr != nullptr; });
;
return is_powered_on;
}
/**
@ -383,7 +381,7 @@ private:
private:
static System s_instance;
bool initalized = false;
std::atomic_bool is_powered_on{};
ResultStatus status = ResultStatus::Success;
std::string status_details = "";