aboutsummaryrefslogtreecommitdiff
path: root/src/SPI.cpp
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-03-27 13:34:26 +0100
committerArisotura <thetotalworm@gmail.com>2019-03-27 13:34:26 +0100
commitf08b87b41f0ffaabd7928d68c41d704e824b5de3 (patch)
tree8a0548247fbd0a63d4a810d4c1c81bd8444681b3 /src/SPI.cpp
parent6d7e80b67768d1c14792f5da5ff59b739e2109e6 (diff)
* move melon_fopen_local() to Platform.cpp
* make it require that the file already exist (hopefully fixing config saving bug) * finally axe melon_fopen.cpp
Diffstat (limited to 'src/SPI.cpp')
-rw-r--r--src/SPI.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SPI.cpp b/src/SPI.cpp
index 5ed9890..6224338 100644
--- a/src/SPI.cpp
+++ b/src/SPI.cpp
@@ -22,7 +22,7 @@
#include "Config.h"
#include "NDS.h"
#include "SPI.h"
-#include "melon_fopen.h"
+#include "Platform.h"
namespace SPI_Firmware
@@ -90,7 +90,7 @@ void Reset()
if (Firmware) delete[] Firmware;
Firmware = NULL;
- FILE* f = melon_fopen_local("firmware.bin", "rb");
+ FILE* f = Platform::OpenLocalFile("firmware.bin", "rb");
if (!f)
{
printf("firmware.bin not found\n");
@@ -130,7 +130,7 @@ void Reset()
// take a backup
char* firmbkp = "firmware.bin.bak";
- f = melon_fopen_local(firmbkp, "rb");
+ f = fopen(firmbkp, "rb");
if (f) fclose(f);
else
{
@@ -325,7 +325,7 @@ void Write(u8 val, u32 hold)
if (!hold && (CurCmd == 0x02 || CurCmd == 0x0A))
{
- FILE* f = melon_fopen_local("firmware.bin", "r+b");
+ FILE* f = Platform::OpenLocalFile("firmware.bin", "r+b");
if (f)
{
u32 cutoff = 0x7FA00 & FirmwareMask;