FrameCommand cleanup, logic fix in "vibrate" handling

This commit is contained in:
Henrik Rydgard committed 2014-02-15 10:15:07 +01:00
1 parent 9cb2292308
commit 263e2207be
2 files changed
+30 -32

No files matched your search

+4 -6
View File
@@ -336,15 +336,13 @@ extern "C" void Java_com_henrikrydgard_libnative_NativeRenderer_displayRender(JN
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}
lock_guard guard(frameCommandLock);
while (!frameCommands.empty()) {
FrameCommand frameCmd;
{
lock_guard guard(frameCommandLock);
frameCmd = frameCommands.front();
frameCommands.pop();
}
frameCmd = frameCommands.front();
frameCommands.pop();
DLOG("frameCommand %s %s", cmd.command.c_str(), frameCmd.params.c_str());
DLOG("frameCommand %s %s", frameCmd.command.c_str(), frameCmd.params.c_str());
jstring cmd = env->NewStringUTF(frameCmd.command.c_str());
jstring param = env->NewStringUTF(frameCmd.params.c_str());