mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 17:35:46 +00:00
core: Eliminate remaining usages of the global system instance
Removes all remaining usages of the global system instance. After this, migration can begin to migrate to being constructed and managed entirely by the various frontends.
This commit is contained in:
parent
5fe92fd841
commit
c06510376a
21 changed files with 59 additions and 1594 deletions
|
@ -4,9 +4,10 @@
|
|||
|
||||
#include <string_view>
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/file_util.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/core.h"
|
||||
#include "core/gdbstub/gdbstub.h"
|
||||
#include "core/hle/service/hid/hid.h"
|
||||
#include "core/settings.h"
|
||||
#include "video_core/renderer_base.h"
|
||||
|
@ -31,13 +32,9 @@ std::string GetTimeZoneString() {
|
|||
return timezones[time_zone_index];
|
||||
}
|
||||
|
||||
void Apply() {
|
||||
GDBStub::SetServerPort(values.gdbstub_port);
|
||||
GDBStub::ToggleServer(values.use_gdbstub);
|
||||
|
||||
auto& system_instance = Core::System::GetInstance();
|
||||
if (system_instance.IsPoweredOn()) {
|
||||
system_instance.Renderer().RefreshBaseSettings();
|
||||
void Apply(Core::System& system) {
|
||||
if (system.IsPoweredOn()) {
|
||||
system.Renderer().RefreshBaseSettings();
|
||||
}
|
||||
|
||||
Service::HID::ReloadInputDevices();
|
||||
|
@ -106,9 +103,9 @@ float Volume() {
|
|||
return values.volume.GetValue();
|
||||
}
|
||||
|
||||
void RestoreGlobalState() {
|
||||
void RestoreGlobalState(bool is_powered_on) {
|
||||
// If a game is running, DO NOT restore the global settings state
|
||||
if (Core::System::GetInstance().IsPoweredOn()) {
|
||||
if (is_powered_on) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue