Пример #1
0
void CheatIF_GT_Show(bool show)
{
 if(!CheatMutex)
  CheatMutex = MDFND_CreateMutex();

 if(!CheatCond)
  CheatCond = MDFND_CreateCond();

 PauseGameLoop(show);
 if(show)
 {
  if(!CheatThread)
  {
   need_thread_exit = false;
   CheatThread = MDFND_CreateThread(CheatLoop, NULL);
  }
 }
 isactive = show;
}
Пример #2
0
bool CDIF_Open(const char *device_name)
{
 CDIF_Message msg;

 ReadThreadQueue = new CDIF_Queue();
 EmuThreadQueue = new CDIF_Queue();
 
 SBMutex = MDFND_CreateMutex();
 SectorBuffers = (CDIF_Sector_Buffer *)calloc(SBSize, sizeof(CDIF_Sector_Buffer));

 SBWritePos = 0;
 ra_lba = 0;
 ra_count = 0;
 last_read_lba = -1;

 CDReadThread = MDFND_CreateThread(ReadThreadStart, device_name ? strdup(device_name) : NULL);

 EmuThreadQueue->Read(&msg);

 if(!msg.args[0])
 {
  MDFND_WaitThread(CDReadThread, NULL);
  delete ReadThreadQueue;
  delete EmuThreadQueue;

  ReadThreadQueue = NULL;
  EmuThreadQueue = NULL;

  return(FALSE);
 }

 LEC_Eval = MDFN_GetSettingB("cdrom.lec_eval");
 if(LEC_Eval)
 {
  Init_LEC_Correct();
 }

 MDFN_printf(_("Raw rip data correction using L-EC: %s\n\n"), LEC_Eval ? _("Enabled") : _("Disabled"));

 return(TRUE);
}