Skip to content

Commit 79cd55f

Browse files
committed
Fixed Input Hook for new Aali driver that uses FF7 instead of ff7 it now supports both formats
1 parent e700318 commit 79cd55f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

UltrasoundInputHooker/Plugin.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public class Plugin : _7HPlugin
1919
[DllImport("user32.dll")]
2020
public static extern IntPtr SetFocus(IntPtr hWnd);
2121

22+
[DllImport("Kernel32.dll")]
23+
public static extern void AllocConsole();
24+
2225
[DllImport("Kernel32.dll")]
2326
public static extern IntPtr GetCurrentThreadId();
2427

@@ -109,7 +112,7 @@ private void getProccess()
109112
{
110113
Process[] processes = Process.GetProcesses();
111114
Console.WriteLine("Proccesses found.");
112-
Regex test = new Regex(@"ff7(_[a-z]{2}){0,1}\.exe");
115+
Regex test = new Regex(@"[fF][fF]7(_[a-z]{2}){0,1}\.exe");
113116
foreach(Process proc in processes)
114117
{
115118
try
@@ -157,7 +160,8 @@ private void getKeys()
157160
}
158161

159162
public override void Start(RuntimeMod mod)
160-
{
163+
{
164+
AllocConsole();
161165
soundCompleteId = hooks_instance.hookSoundComplete(new SoundCompleteAction((int soundId, string f) =>
162166
{
163167
Console.WriteLine("Sound from file " + f + " has finished");

UltrasoundInputHooker/UltrasoundInputHooker.csproj.user

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
44
<StartAction>Program</StartAction>
5-
<StartProgram>D:\Games\FF7-heaven v1.54\7thHeaven.exe</StartProgram>
5+
<StartProgram>D:\Projects\GitHub\7h\.dist\Build\Debug\7thHeaven.exe</StartProgram>
66
</PropertyGroup>
77
</Project>

0 commit comments

Comments
 (0)