Page 1 of 1

OnIdle loop executes emuMain twice

Posted: Sun Aug 23, 2009 10:28 am
by spacy51

The MFC GUI executes emuMain twice in OnIdle. Why?

I tested it without the for statement, and there's no difference for me.

 

for(int i = 0; i < 2; i++) {
emulator.emuMain(emulator.emuCount);

Code: Select all

  if(lanlink.connected&&linkid&&lc.numtransfers==0) lc.CheckConn();

 

Code: Select all

  if(rewindSaveNeeded && rewindMemory && emulator.emuWriteMemState) {


    rewindCount++;


    if(rewindCount > 8)


      rewindCount = 8;


    if(emulator.emuWriteMemState(&rewindMemory[rewindPos*REWIND_SIZE],


                                 REWIND_SIZE)) {


      rewindPos = ++rewindPos & 7;


      if(rewindCount == 8)


        rewindTopPos = ++rewindTopPos & 7;


    }


  }

 

Code: Select all

  rewindSaveNeeded = false;


[b]}[/b]