Custom path support (#1333)

also including:
* getting rid of shitty strings
* all new, cleaner ROM handling code
* base for DSi savestates
* GBA slot addons (for now, memory cart)
This commit is contained in:
Arisotura
2022-01-07 14:00:43 +01:00
committed by GitHub
parent c4cd9da674
commit e665e25bd3
64 changed files with 3606 additions and 2662 deletions

View File

@ -43,7 +43,10 @@
* different minor means adjustments may have to be made
*/
Savestate::Savestate(const char* filename, bool save)
// TODO: buffering system! or something of that sort
// repeated fread/fwrite is slow on Switch
Savestate::Savestate(std::string filename, bool save)
{
const char* magic = "MELN";
@ -55,7 +58,7 @@ Savestate::Savestate(const char* filename, bool save)
file = Platform::OpenLocalFile(filename, "wb");
if (!file)
{
printf("savestate: file %s doesn't exist\n", filename);
printf("savestate: file %s doesn't exist\n", filename.c_str());
Error = true;
return;
}
@ -74,7 +77,7 @@ Savestate::Savestate(const char* filename, bool save)
file = Platform::OpenFile(filename, "rb");
if (!file)
{
printf("savestate: file %s doesn't exist\n", filename);
printf("savestate: file %s doesn't exist\n", filename.c_str());
Error = true;
return;
}