Skip to content
Permalink
Browse files

Try flushing the buffer after every syscall (they are all synchronous)

  • Loading branch information...
Kangz committed Feb 6, 2015
1 parent b46f476 commit 00caaf83134a0e64e5abdb9e48205e4d9dae6a7a
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/gamelogic/cgame/cg_api.cpp
@@ -72,7 +72,6 @@ void VM::VMHandleSyscall(uint32_t id, Util::Reader reader) {
IPC::HandleMsg<CGameDrawActiveFrameMsg>(VM::rootChannel, std::move(reader), [] (int serverTime, bool demoPlayback) {
CG_DrawActiveFrame(serverTime, demoPlayback);
});
cmdBuffer.TryFlush();
break;

case CG_CROSSHAIR_PLAYER:
@@ -101,7 +100,6 @@ void VM::VMHandleSyscall(uint32_t id, Util::Reader reader) {

case CG_ROCKET_FRAME:
IPC::HandleMsg<CGameRocketFrameMsg>(VM::rootChannel, std::move(reader), CG_Rocket_Frame);
cmdBuffer.TryFlush();
break;

case CG_ROCKET_FORMAT_DATA:
@@ -133,6 +131,7 @@ void VM::VMHandleSyscall(uint32_t id, Util::Reader reader) {
} else {
CG_Error("unhandled VM major syscall number %i", major);
}
cmdBuffer.TryFlush();
}

// Definition of the VM->Engine calls

0 comments on commit 00caaf8

Please sign in to comment.
You can’t perform that action at this time.