1
0
mirror of synced 2024-11-28 00:20:52 +01:00

Remove WaitEvent from HOTD4

This commit is contained in:
Aaron M 2019-11-09 07:17:51 +13:00
parent 6196016a75
commit 122caf547e

View File

@ -27,6 +27,7 @@ static Helpers *myHelpers;
extern HINSTANCE gl_cgGLDll;
static bool HealthA = false;
static bool HealthB = false;
static bool init = false;
SDL_Event e;
static int RunningThread(void *ptr)
@ -274,6 +275,11 @@ static int RunningThread(void *ptr)
void HOTD4::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
if (!init)
{
myTriggers = triggers;
myConstants = constants;
myHelpers = helpers;
SDL_Thread* thread;
thread = SDL_CreateThread(RunningThread, "RunningThread", (void*)NULL);
@ -319,12 +325,7 @@ void HOTD4::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers
SDL_HapticRumbleInit(ControllerHaptic2);
}
}
while (SDL_WaitEvent(&e) != 0)
{
myTriggers = triggers;
myConstants = constants;
myHelpers = helpers;
init = true;
}
myTriggers = triggers;