Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirdEyeSqueegee committed May 9, 2024
1 parent 1b0ee82 commit 48ccd02
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.")

project(
DynamicWait
VERSION 1.0.0
VERSION 1.0.1
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 23)
Expand Down
16 changes: 8 additions & 8 deletions cmake/version.rc.in
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
#include <winres.h>
#include <winver.h>

1 VERSIONINFO
FILEVERSION @PROJECT_VERSION_MAJOR@, @PROJECT_VERSION_MINOR@, @PROJECT_VERSION_PATCH@, 0
PRODUCTVERSION @PROJECT_VERSION_MAJOR@, @PROJECT_VERSION_MINOR@, @PROJECT_VERSION_PATCH@, 0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
FILEFLAGS 0
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
FILEOS VOS_NT
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BLOCK "040904B0"
BEGIN
VALUE "FileDescription", "@PROJECT_DESCRIPTION@"
VALUE "FileVersion", "@PROJECT_VERSION@"
VALUE "InternalName", "@PROJECT_NAME@"
VALUE "LegalCopyright", "Apache License 2.0"
VALUE "LegalCopyright", "GNU General Public License v3.0"
VALUE "ProductName", "@PROJECT_FRIENDLY_NAME@"
VALUE "ProductVersion", "@PROJECT_VERSION@"
END
Expand Down
1 change: 1 addition & 0 deletions contrib/Config/DynamicWait.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[General]
# https://ck.uesp.net/wiki/Input_Script#DXScanCodes
uWaitHotkey = 40
fWaitMultiplier = 2.0
bRampUpMultiplier = true
Expand Down
13 changes: 11 additions & 2 deletions src/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Events
{
using enum RE::INPUT_DEVICE;

RE::BSEventNotifyControl InputEventHandler::ProcessEvent(RE::InputEvent* const* a_event, RE::BSTEventSource<RE::InputEvent*>* a_eventSource) noexcept
{
if (!a_event) {
Expand All @@ -14,8 +16,15 @@ namespace Events
if (const auto control_map{ RE::ControlMap::GetSingleton() }; control_map->IsMovementControlsEnabled()) {
for (auto e{ *a_event }; e != nullptr; e = e->next) {
if (const auto btn_event{ e->AsButtonEvent() }) {
const auto keycode{ btn_event->GetIDCode() };
if (btn_event->GetDevice() == RE::INPUT_DEVICE::kKeyboard && keycode == Settings::wait_hotkey) {
auto keycode{ btn_event->GetIDCode() };
const auto device{ btn_event->GetDevice() };
if (device != kKeyboard && device != kGamepad) {
return RE::BSEventNotifyControl::kContinue;
}
if (device == kGamepad) {
keycode = SKSE::InputMap::GamepadMaskToKeycode(keycode);
}
if (keycode == Settings::wait_hotkey) {
if (const auto timer{ RE::BSTimer::GetSingleton() }) {
if (btn_event->IsHeld()) {
if (Utility::waiting) {
Expand Down
10 changes: 8 additions & 2 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "dynamic-wait",
"version-semver": "1.0.0",
"version-semver": "1.0.1",
"builtin-baseline": "3dcd8bb40bc2bbedf206e0bf0dc72c26e2aa2ddd",
"dependencies": ["fmt", "spdlog", "rapidcsv", "simpleini", "directxtk"],
"dependencies": [
"fmt",
"spdlog",
"rapidcsv",
"simpleini",
"directxtk"
],
"license": "GPL-3.0-or-later"
}

0 comments on commit 48ccd02

Please sign in to comment.