mirror of https://github.com/snes9xgit/snes9x.git
Release bsx streams on reset
This commit is contained in:
parent
51dfeeac9e
commit
4c87a84328
13
bsx.cpp
13
bsx.cpp
|
@ -899,7 +899,8 @@ void S9xSetBSX (uint8 byte, uint32 address)
|
||||||
|
|
||||||
void S9xBSXSetStream1 (uint8 count)
|
void S9xBSXSetStream1 (uint8 count)
|
||||||
{
|
{
|
||||||
if (BSX.sat_stream1.is_open()) BSX.sat_stream1.close(); //If Stream1 already opened for one file: Close it.
|
if (BSX.sat_stream1.is_open())
|
||||||
|
BSX.sat_stream1.close(); //If Stream1 already opened for one file: Close it.
|
||||||
|
|
||||||
char path[PATH_MAX + 1], name[PATH_MAX + 1];
|
char path[PATH_MAX + 1], name[PATH_MAX + 1];
|
||||||
|
|
||||||
|
@ -930,7 +931,8 @@ void S9xBSXSetStream1 (uint8 count)
|
||||||
|
|
||||||
void S9xBSXSetStream2 (uint8 count)
|
void S9xBSXSetStream2 (uint8 count)
|
||||||
{
|
{
|
||||||
if (BSX.sat_stream2.is_open()) BSX.sat_stream2.close(); //If Stream1 already opened for one file: Close it.
|
if (BSX.sat_stream2.is_open())
|
||||||
|
BSX.sat_stream2.close(); //If Stream1 already opened for one file: Close it.
|
||||||
|
|
||||||
char path[PATH_MAX + 1], name[PATH_MAX + 1];
|
char path[PATH_MAX + 1], name[PATH_MAX + 1];
|
||||||
|
|
||||||
|
@ -1519,6 +1521,13 @@ void S9xResetBSX (void)
|
||||||
BSX.sat_stream1_first, BSX.sat_stream2_first = FALSE;
|
BSX.sat_stream1_first, BSX.sat_stream2_first = FALSE;
|
||||||
BSX.sat_stream1_count, BSX.sat_stream2_count = 0;
|
BSX.sat_stream1_count, BSX.sat_stream2_count = 0;
|
||||||
|
|
||||||
|
if (BSX.sat_stream1.is_open())
|
||||||
|
BSX.sat_stream1.close();
|
||||||
|
|
||||||
|
if (BSX.sat_stream2.is_open())
|
||||||
|
BSX.sat_stream2.close();
|
||||||
|
|
||||||
|
if (Settings.BS)
|
||||||
BSX_Map();
|
BSX_Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
cpu.cpp
2
cpu.cpp
|
@ -288,9 +288,7 @@ void S9xReset (void)
|
||||||
memset(Memory.VRAM, 0x00, 0x10000);
|
memset(Memory.VRAM, 0x00, 0x10000);
|
||||||
memset(Memory.FillRAM, 0, 0x8000);
|
memset(Memory.FillRAM, 0, 0x8000);
|
||||||
|
|
||||||
if (Settings.BS)
|
|
||||||
S9xResetBSX();
|
S9xResetBSX();
|
||||||
|
|
||||||
S9xResetCPU();
|
S9xResetCPU();
|
||||||
S9xResetPPU();
|
S9xResetPPU();
|
||||||
S9xResetDMA();
|
S9xResetDMA();
|
||||||
|
|
Loading…
Reference in New Issue