Fixed some MIDI-related crashes and AdLib Gold now writes the correct amount of EEPROM bytes on close.
This commit is contained in:
@@ -295,6 +295,9 @@ midi_in_device_init()
|
|||||||
void
|
void
|
||||||
midi_raw_out_rt_byte(uint8_t val)
|
midi_raw_out_rt_byte(uint8_t val)
|
||||||
{
|
{
|
||||||
|
if (!midi_in)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!midi_in->midi_realtime)
|
if (!midi_in->midi_realtime)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -310,7 +313,7 @@ midi_raw_out_rt_byte(uint8_t val)
|
|||||||
void
|
void
|
||||||
midi_raw_out_thru_rt_byte(uint8_t val)
|
midi_raw_out_thru_rt_byte(uint8_t val)
|
||||||
{
|
{
|
||||||
if (midi_in->thruchan)
|
if (midi_in && midi_in->thruchan)
|
||||||
midi_raw_out_rt_byte(val);
|
midi_raw_out_rt_byte(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -820,7 +820,7 @@ void adgold_close(void *p)
|
|||||||
f = nvr_fopen(L"adgold.bin", L"wb");
|
f = nvr_fopen(L"adgold.bin", L"wb");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
fwrite(adgold->adgold_eeprom, 0x18, 1, f);
|
fwrite(adgold->adgold_eeprom, 0x1a, 1, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user