__gshared hack to allow inputevent access from sound thread, fixes #1

This commit is contained in:
edmccard 2012-03-15 18:30:24 -04:00
parent 4e4ca09af8
commit ef7f3adf00
2 changed files with 1 additions and 3 deletions

View File

@ -79,7 +79,7 @@ static this()
} }
} }
Input input; __gshared Input input;
private: private:

View File

@ -38,7 +38,6 @@ static import host;
static this() static this()
{ {
soundCard = new SoundCardNo(); soundCard = new SoundCardNo();
/+ TODO: fix sound segfault in fillAudio
if (host.SDL) if (host.SDL)
{ {
if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1)
@ -50,7 +49,6 @@ static this()
if (checkCard.isActive) if (checkCard.isActive)
soundCard = checkCard; soundCard = checkCard;
} }
+/
host.delay.soundCardActive = &soundCard.getIsActive; host.delay.soundCardActive = &soundCard.getIsActive;
host.delay.soundCardHasEnoughData = &soundCard.hasEnoughData; host.delay.soundCardHasEnoughData = &soundCard.hasEnoughData;
} }