Skip to content

Commit

Permalink
Fix for Linux and MacOS compilations
Browse files Browse the repository at this point in the history
  • Loading branch information
Slushi-Github committed Oct 20, 2024
1 parent ecac3bd commit b2004e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions funkinscsource/slushi/windows/ProgramRespondingUtil.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package slushi.windows;

#if windows
@:cppFileCode('
#include <windows.h>
#include <thread>
Expand Down Expand Up @@ -41,8 +42,10 @@ void CheckIfWindowResponsive(HWND hwnd) {
}
}
')
#end
class ProgramRespondingUtil
{
#if windows
@:functionCode('
HWND hwnd = GetActiveWindow();

Expand All @@ -53,4 +56,5 @@ class ProgramRespondingUtil
public static function initThread()
{
}
#end
}
3 changes: 2 additions & 1 deletion funkinscsource/slushi/windows/WindowsFuncs.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import sys.io.Process;
import sys.io.File;
import lime.system.System;
import psychlua.LuaUtils;
import slushi.windows.ProgramRespondingUtil;

/*
* This file is one that facilitates the use of Windows functions that come from WindowsCPP.hx within SLE.
Expand Down Expand Up @@ -203,7 +204,7 @@ class WindowsFuncs
{
#if windows
Sys.println("[slushi.windows.WindowsFuncs.initThreadForWindowRespondingHandler] - Starting thread for window responding handler...");
slushi.windows.ProgramRespondingUtil.initThread();
ProgramRespondingUtil.initThread();
#end
}

Expand Down

0 comments on commit b2004e9

Please sign in to comment.