Skip to content

Commit

Permalink
Build and keyboard handler fix
Browse files Browse the repository at this point in the history
Fixed the ResetKeyState not being recognized
  • Loading branch information
cvs0 committed Mar 31, 2024
1 parent 5a63fd3 commit 2dbe3c1
Show file tree
Hide file tree
Showing 19 changed files with 16 additions and 17 deletions.
Binary file modified .vs/NativeTrainer/v17/.suo
Binary file not shown.
Binary file modified .vs/NativeTrainer/v17/Browse.VC.db
Binary file not shown.
Binary file added NativeTrainer/bin/Release/NativeTrainer.asi
Binary file not shown.
15 changes: 8 additions & 7 deletions NativeTrainer/keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ bool IsKeyDownLong(DWORD key)
return (GetTickCount64() < keyStates[key].time + MAX_DOWN_LONG) && !keyStates[key].isUpNow;
}

void ResetKeyState(DWORD key)
{
if (key >= 0 && key < KEYS_SIZE)
memset(&keyStates[key], 0, sizeof(KeyState));
}


bool IsKeyJustUp(DWORD key, bool exclusive)
{
if (key < 0 || key >= KEYS_SIZE)
Expand All @@ -56,10 +63,4 @@ bool IsKeyJustUp(DWORD key, bool exclusive)
ResetKeyState(key);

return isJustUp;
}

void ResetKeyState(DWORD key)
{
if (key >= 0 && key < KEYS_SIZE)
memset(&keyStates[key], 0, sizeof(KeyState));
}
}
Binary file modified NativeTrainer/tmp/Release/NativeTrainer.iobj
Binary file not shown.
Binary file modified NativeTrainer/tmp/Release/NativeTrainer.ipdb
Binary file not shown.
13 changes: 4 additions & 9 deletions NativeTrainer/tmp/Release/NativeTrainer.log
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
 script.cpp
C:\Users\cvs0_\Desktop\rdr2_modding\scripthookrdr2\projects\cvsTrainer\NativeTrainer\scriptmenu.h(246,65): warning C4244: '=': conversion from 'ULONGLONG' to 'DWORD', possible loss of data
(compiling source file 'script.cpp')

C:\Users\cvs0_\Desktop\rdr2_modding\scripthookrdr2\projects\cvsTrainer\NativeTrainer\script.cpp(1066,35): warning C4244: '=': conversion from 'ULONGLONG' to 'DWORD', possible loss of data
C:\Users\cvs0_\Desktop\rdr2_modding\scripthookrdr2\projects\cvsTrainer\NativeTrainer\script.cpp(1606,22): warning C4244: 'argument': conversion from 'ULONGLONG' to 'unsigned int', possible loss of data
 keyboard.cpp
C:\Users\cvs0_\Desktop\rdr2_modding\scripthookrdr2\projects\cvsTrainer\NativeTrainer\keyboard.cpp(24,45): warning C4244: '=': conversion from 'ULONGLONG' to 'DWORD', possible loss of data
Generating code
16 of 1046 functions ( 1.5%) were compiled, the rest were copied from previous compilation.
11 functions were new in current compilation
82 functions had inline decision re-evaluated but remain unchanged
Previous IPDB was built with incompatible compiler, fall back to full compilation.
All 1056 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
Finished generating code
NativeTrainer.vcxproj -> C:\Users\cvs0_\Desktop\rdr2_modding\scripthookrdr2\projects\cvsTrainer\NativeTrainer\bin\Release\NativeTrainer.asi
'pwsh.exe' is not recognized as an internal or external command,
Expand Down
Binary file modified NativeTrainer/tmp/Release/NativeTrainer.tlog/CL.command.1.tlog
Binary file not shown.
Binary file modified NativeTrainer/tmp/Release/NativeTrainer.tlog/CL.read.1.tlog
Binary file not shown.
Binary file modified NativeTrainer/tmp/Release/NativeTrainer.tlog/CL.write.1.tlog
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.38.33130:TargetPlatformVersion=10.0.22621.0:VcpkgTriplet=x64-windows:
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0:VcpkgTriplet=x64-windows:
Release|x64|C:\Users\cvs0_\Desktop\rdr2_modding\scripthookrdr2\projects\cvsTrainer\|
Binary file modified NativeTrainer/tmp/Release/NativeTrainer.tlog/link.read.1.tlog
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
^C:\USERS\CVS0_\DESKTOP\RDR2_MODDING\SCRIPTHOOKRDR2\PROJECTS\CVSTRAINER\NATIVETRAINER\TMP\RELEASE\KEYBOARD.OBJ|C:\USERS\CVS0_\DESKTOP\RDR2_MODDING\SCRIPTHOOKRDR2\PROJECTS\CVSTRAINER\NATIVETRAINER\TMP\RELEASE\MAIN.OBJ|C:\USERS\CVS0_\DESKTOP\RDR2_MODDING\SCRIPTHOOKRDR2\PROJECTS\CVSTRAINER\NATIVETRAINER\TMP\RELEASE\SCRIPT.OBJ|C:\USERS\CVS0_\DESKTOP\RDR2_MODDING\SCRIPTHOOKRDR2\PROJECTS\CVSTRAINER\NATIVETRAINER\TMP\RELEASE\SCRIPTMENU.OBJ
C:\Users\cvs0_\Desktop\rdr2_modding\scripthookrdr2\projects\cvsTrainer\NativeTrainer\tmp\Release\NativeTrainer.IPDB
C:\Users\cvs0_\Desktop\rdr2_modding\scripthookrdr2\projects\cvsTrainer\NativeTrainer\tmp\Release\NativeTrainer.iobj
Binary file modified NativeTrainer/tmp/Release/NativeTrainer.tlog/link.write.1.tlog
Binary file not shown.
Binary file modified NativeTrainer/tmp/Release/keyboard.obj
Binary file not shown.
Binary file modified NativeTrainer/tmp/Release/main.obj
Binary file not shown.
Binary file modified NativeTrainer/tmp/Release/script.obj
Binary file not shown.
Binary file modified NativeTrainer/tmp/Release/scriptmenu.obj
Binary file not shown.
Binary file modified NativeTrainer/tmp/Release/vc143.pdb
Binary file not shown.

0 comments on commit 2dbe3c1

Please sign in to comment.