mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-01 08:25:12 +01:00
comment out VBA code free(pix) to fix crash
This commit is contained in:
parent
d294c6d96d
commit
10ef70fcdd
@ -1349,7 +1349,8 @@ void CPUCleanUp()
|
|||||||
|
|
||||||
if(pix != NULL)
|
if(pix != NULL)
|
||||||
{
|
{
|
||||||
free(pix);
|
// this causes system to CRASH when switching from GBA to GB and then back to GBA
|
||||||
|
//free(pix);
|
||||||
pix = NULL;
|
pix = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2562,7 +2562,7 @@ bool gbWriteBMPFile(const char *fileName)
|
|||||||
|
|
||||||
void gbCleanUp()
|
void gbCleanUp()
|
||||||
{
|
{
|
||||||
if(gbRam != NULL)
|
if(gbRam != NULL)
|
||||||
{
|
{
|
||||||
free(gbRam);
|
free(gbRam);
|
||||||
gbRam = NULL;
|
gbRam = NULL;
|
||||||
@ -2588,7 +2588,8 @@ void gbCleanUp()
|
|||||||
|
|
||||||
if(pix != NULL)
|
if(pix != NULL)
|
||||||
{
|
{
|
||||||
free(pix);
|
// this causes system to CRASH when switching from GB to GBA and then back to GB
|
||||||
|
//free(pix);
|
||||||
pix = NULL;
|
pix = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3311,13 +3312,13 @@ void gbEmulate(int ticksToStop)
|
|||||||
if(soundOffFlag) {
|
if(soundOffFlag) {
|
||||||
if(synchronize && !speedup) {
|
if(synchronize && !speedup) {
|
||||||
synchronizeTicks -= clockTicks;
|
synchronizeTicks -= clockTicks;
|
||||||
|
|
||||||
while(synchronizeTicks < 0) {
|
while(synchronizeTicks < 0) {
|
||||||
synchronizeTicks += SYNCHRONIZE_CLOCK_TICKS;
|
synchronizeTicks += SYNCHRONIZE_CLOCK_TICKS;
|
||||||
|
|
||||||
DWORD now = timeGetTime();
|
DWORD now = timeGetTime();
|
||||||
gbElapsedTime += (now - timeNow);
|
gbElapsedTime += (now - timeNow);
|
||||||
|
|
||||||
if(gbElapsedTime < 50) {
|
if(gbElapsedTime < 50) {
|
||||||
DWORD diff = 50 - gbElapsedTime;
|
DWORD diff = 50 - gbElapsedTime;
|
||||||
Sleep(diff);
|
Sleep(diff);
|
||||||
|
Loading…
Reference in New Issue
Block a user