I believe that the declaration of FlagEmuStop should be changed to
static volatile unsigned char FlagEmuStop=TH_RUNNING;
because as it is, a compiler is free to change the loop
FlagEmuStop=TH_WAITING; //Signal Main thread we are waiting
while(FlagEmuStop==TH_WAITING)
Sleep(1);
in EmuLoop() to
FlagEmuStop = TH_WAITING;
for (;;)
Sleep(1);
since FlagEmuStop is static and its address is never passed outside Vcc.c.
I've been running Vcc on Linux using WINE, and I find that selecting exit doesn't close the Vcc window. I can't swear that this is the cause of the problem, but it could be. I don't use Windows (save under duress), and Visual Studio is in the "garbage" category at winehq, so I can't make the change locally and rebuild to test; sorry about that.
I believe that the declaration of FlagEmuStop should be changed to
static volatile unsigned char FlagEmuStop=TH_RUNNING;
because as it is, a compiler is free to change the loopin EmuLoop() to
since FlagEmuStop is static and its address is never passed outside Vcc.c.
I've been running Vcc on Linux using WINE, and I find that selecting exit doesn't close the Vcc window. I can't swear that this is the cause of the problem, but it could be. I don't use Windows (save under duress), and Visual Studio is in the "garbage" category at winehq, so I can't make the change locally and rebuild to test; sorry about that.