Remove WaitEvent from HOTD4
This commit is contained in:
parent
6196016a75
commit
122caf547e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user