mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-06 19:11:21 -04:00
turbo keybind tool
This commit is contained in:
@@ -14,6 +14,8 @@ constexpr const char* SHOW_STUB_LOG = "F5";
|
||||
constexpr const char* SHOW_CAMERA_DEBUG = "F6";
|
||||
constexpr const char* SHOW_AUDIO_DEBUG = "F7";
|
||||
|
||||
constexpr const char* TURBO = "Tab";
|
||||
|
||||
}
|
||||
|
||||
#endif // DUSK_HOTKEYS_H
|
||||
|
||||
@@ -57,6 +57,9 @@ struct UserSettings {
|
||||
|
||||
// Technical
|
||||
bool restoreWiiGlitches;
|
||||
|
||||
// Controls
|
||||
bool enableTurboKeybind;
|
||||
} game;
|
||||
};
|
||||
|
||||
@@ -77,6 +80,7 @@ struct CollisionViewSettings {
|
||||
|
||||
struct TransientSettings {
|
||||
CollisionViewSettings collisionView;
|
||||
bool skipFrameRateLimit;
|
||||
};
|
||||
|
||||
TransientSettings& getTransientSettings();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "aurora/aurora.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "dusk/logging.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "global.h"
|
||||
|
||||
void JFWDisplay::ctor_subroutine(bool enableAlpha) {
|
||||
@@ -347,7 +348,11 @@ void JFWDisplay::waitBlanking(int param_0) {
|
||||
}
|
||||
|
||||
static void waitForTick(u32 p1, u16 p2) {
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::getTransientSettings().skipFrameRateLimit) {
|
||||
p1 = OS_TIMER_CLOCK / 120;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (p1 != 0)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "ImGuiConsole.hpp"
|
||||
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include "dusk/settings.h"
|
||||
|
||||
#if _WIN32
|
||||
#define NOMINMAX
|
||||
@@ -182,6 +183,8 @@ namespace dusk {
|
||||
m_isLaunchInitialized = true;
|
||||
}
|
||||
|
||||
getTransientSettings().skipFrameRateLimit = getSettings().game.enableTurboKeybind && ImGui::IsKeyDown(ImGuiKey_Tab);
|
||||
|
||||
if (CheckMenuViewToggle(ImGuiKey_F1, m_isHidden)) {
|
||||
ShowToasts();
|
||||
return;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "aurora/gfx.h"
|
||||
|
||||
#include "dusk/hotkeys.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "ImGuiConsole.hpp"
|
||||
#include "ImGuiMenuTools.hpp"
|
||||
|
||||
@@ -48,6 +49,8 @@ namespace dusk {
|
||||
ImGui::MenuItem("Save Editor", nullptr, &m_showSaveEditor);
|
||||
ImGui::MenuItem("Audio Debug", hotkeys::SHOW_AUDIO_DEBUG, &m_showAudioDebug);
|
||||
ImGui::MenuItem("OSReport Force", nullptr, &OSReportReallyForceEnable);
|
||||
ImGui::Separator();
|
||||
ImGui::MenuItem("Enable Turbo Key", hotkeys::TURBO, &getSettings().game.enableTurboKeybind);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ UserSettings g_userSettings = {
|
||||
|
||||
// Technical
|
||||
.restoreWiiGlitches = false,
|
||||
|
||||
// Controls
|
||||
.enableTurboKeybind = true,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -73,6 +76,7 @@ static TransientSettings g_transientSettings = {
|
||||
.colliderViewOpacity = 50.0f,
|
||||
.drawRange = 100.0f,
|
||||
},
|
||||
.skipFrameRateLimit = false,
|
||||
};
|
||||
|
||||
TransientSettings& getTransientSettings() {
|
||||
|
||||
Reference in New Issue
Block a user