SNES: only skip 512 byte rom header (#476)

This commit is contained in:
Sergey Dvodnenko
2021-10-26 20:28:38 +03:00
committed by GitHub
parent e7ad487e89
commit 91b93352ba

View File

@@ -2146,7 +2146,7 @@ int user_io_file_tx(const char* name, unsigned char index, char opensave, char m
user_io_file_tx_data(buf, 512);
//strip original SNES ROM header if present (not used)
if (bytes2send & 512)
if ((bytes2send % 1024) == 512)
{
bytes2send -= 512;
FileReadSec(&f, buf);
@@ -2188,7 +2188,7 @@ int user_io_file_tx(const char* name, unsigned char index, char opensave, char m
user_io_file_tx_data(buf, 512);
//strip original SNES ROM header if present (not used)
if (bytes2send & 512)
if ((bytes2send % 1024) == 512)
{
bytes2send -= 512;
FileReadSec(&f, buf);
@@ -3584,4 +3584,4 @@ void user_io_screenshot_cmd(const char *cmd)
cmd++;
user_io_screenshot(cmd);
}
}