video_core; Get rid of global g_toggle_framelimit_enabled variable

Instead, we make a struct for renderer settings and allow the renderer
to update all of these settings, getting rid of the need for
global-scoped variables.

This also uncovered a few indirect inclusions for certain headers, which
this commit also fixes.
This commit is contained in:
Lioncash 2018-08-10 18:39:37 -04:00
parent f380496728
commit 20c2928c2b
8 changed files with 44 additions and 30 deletions

View file

@ -6,6 +6,7 @@
#include <vector>
#include <boost/optional.hpp>
#include "common/common_funcs.h"
#include "common/math_util.h"
#include "common/swap.h"
#include "core/hle/kernel/event.h"

View file

@ -7,22 +7,18 @@
#include "core/hle/service/hid/hid.h"
#include "core/settings.h"
#include "video_core/renderer_base.h"
#include "video_core/video_core.h"
namespace Settings {
Values values = {};
void Apply() {
GDBStub::SetServerPort(values.gdbstub_port);
GDBStub::ToggleServer(values.use_gdbstub);
VideoCore::g_toggle_framelimit_enabled = values.toggle_framelimit;
auto& system_instance = Core::System::GetInstance();
if (system_instance.IsPoweredOn()) {
system_instance.Renderer().UpdateCurrentFramebufferLayout();
system_instance.Renderer().RefreshBaseSettings();
}
Service::HID::ReloadInputDevices();