Пример #1
0
void Netplay_GT_CheckPendingLine(void)
{
 size_t c = LineFIFO.CanRead();

 while(c--)
 {
  char* str = LineFIFO.Read();
  bool inputable_tmp = false, viewable_tmp = false;

  MDFNI_NetplayLine(str, inputable_tmp, viewable_tmp);
  free(str);

  SendCEvent(CEVT_NP_LINE_RESPONSE, (void*)inputable_tmp, (void*)viewable_tmp);
 }
}
Пример #2
0
// Called from game thread
int NetplayEventHook_GT(const SDL_Event *event)
{
 if(event->type == SDL_USEREVENT)
 {
  switch(event->user.code)
  {
   case CEVT_NP_LINE:
	{
	 bool inputable_tmp = false, viewable_tmp = false;

	 MDFNI_NetplayLine((const char*)event->user.data1, inputable_tmp, viewable_tmp);
	 free(event->user.data1);

	 SendCEvent(CEVT_NP_LINE_RESPONSE, (void*)inputable_tmp, (void*)viewable_tmp);
	}
	break;
  }
 }
 return(1);
}