w
w
This commit is contained in:
commit
7bd33ca73b
98 files changed
+56670
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#include "FpsUnlocker.h"
|
||||
|
||||
#include "helpers.h"
|
||||
|
||||
FpsUnlockerModule::FpsUnlockerModule()
|
||||
: BaseModule("FpsUnlocker", "Fps Unlocker", ModuleCategory::Visual) {}
|
||||
|
||||
void FpsUnlockerModule::RegisterTab() {
|
||||
fps_target_ = 300;
|
||||
}
|
||||
|
||||
void FpsUnlockerModule::Render() {
|
||||
if (!ImGui::CollapsingHeader(Tr("Fps Unlocker"), ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool enabled = Enabled();
|
||||
if (ImGui::Checkbox(Tr("ON / OFF"), &enabled)) {
|
||||
SetEnabled(enabled);
|
||||
}
|
||||
|
||||
if (Enabled()) {
|
||||
ImGui::DragInt(Tr("Fps Value"), &fps_target_, 1.0f, 30, 500, "%d");
|
||||
}
|
||||
|
||||
using FnSetTargetFrameRate = void (*)(int);
|
||||
auto set_target_fps = GetIl2cppFn<FnSetTargetFrameRate>(IL2CPP::Application_set_targetFrameRate);
|
||||
if (set_target_fps) {
|
||||
set_target_fps(Enabled() ? fps_target_ : 60);
|
||||
}
|
||||
}
|
||||
|
||||
void FpsUnlockerModule::Update() {
|
||||
}
|
||||
Reference in new issue
Block a user