Skip to content

Commit

Permalink
Fixed Input Hook for new Aali driver that uses FF7 instead of ff7 it …
Browse files Browse the repository at this point in the history
…now supports both formats
  • Loading branch information
barkermn01 committed Jan 23, 2020
1 parent e700318 commit 79cd55f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions UltrasoundInputHooker/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public class Plugin : _7HPlugin
[DllImport("user32.dll")]
public static extern IntPtr SetFocus(IntPtr hWnd);

[DllImport("Kernel32.dll")]
public static extern void AllocConsole();

[DllImport("Kernel32.dll")]
public static extern IntPtr GetCurrentThreadId();

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

public override void Start(RuntimeMod mod)
{
{
AllocConsole();
soundCompleteId = hooks_instance.hookSoundComplete(new SoundCompleteAction((int soundId, string f) =>
{
Console.WriteLine("Sound from file " + f + " has finished");
Expand Down
2 changes: 1 addition & 1 deletion UltrasoundInputHooker/UltrasoundInputHooker.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartAction>Program</StartAction>
<StartProgram>D:\Games\FF7-heaven v1.54\7thHeaven.exe</StartProgram>
<StartProgram>D:\Projects\GitHub\7h\.dist\Build\Debug\7thHeaven.exe</StartProgram>
</PropertyGroup>
</Project>

0 comments on commit 79cd55f

Please sign in to comment.