Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
RACE
Commits
e0c56aa7
Commit
e0c56aa7
authored
Sep 17, 2021
by
Libretro-Admin
Browse files
Revert "Add TODO/FIXME and cleanup handleInputFile"
This reverts commit
c16abcfb
.
parent
c16abcfb
Pipeline
#53764
passed with stages
in 8 minutes and 49 seconds
Changes
2
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
flash.c
View file @
e0c56aa7
...
...
@@ -224,8 +224,6 @@ void setupNGFfilename(void)
}
/* write all the dirty blocks out to a file */
/* TODO/FIXME - shouldn't this just go through libretro's get_memory_data
* interface instead? */
void
writeSaveGameFile
(
void
)
{
/* find the dirty blocks and write them to the .NGF file */
...
...
main.c
View file @
e0c56aa7
...
...
@@ -213,48 +213,37 @@ static int strrchr2(const char *src, int c)
return
0
;
}
#ifdef LOW_MEMORY
int
handleInputFile
(
const
char
*
romName
,
const
unsigned
char
*
romData
,
int
romSize
)
{
FILE
*
romFile
=
NULL
;
initSysInfo
();
//initialize it all
//get ROM from binary ROM file
romFile
=
fopen
(
romName
,
"rb"
);
if
(
!
romFile
)
if
(
romData
)
{
log_cb
(
RETRO_LOG_ERROR
,
"Couldn't open %s file
\n
"
,
romName
);
return
0
;
}
m_emuInfo
.
romSize
=
fread
(
mainrom
,
1
,
MAINROM_SIZE_MAX
,
romFile
);
strcpy
(
m_emuInfo
.
RomFileName
,
romName
);
int
size
=
romSize
>
MAINROM_SIZE_MAX
?
MAINROM_SIZE_MAX
:
romSize
;
fclose
(
romFile
);
if
(
!
initRom
())
{
log_cb
(
RETRO_LOG_ERROR
,
"initRom couldn't handle %s file
\n
"
,
romName
);
return
0
;
m_emuInfo
.
romSize
=
size
;
memcpy
(
mainrom
,
romData
,
size
);
strcpy
(
m_emuInfo
.
RomFileName
,
romName
);
}
else
{
FILE
*
romFile
=
NULL
;
setFlashSize
(
m_emuInfo
.
romSize
);
return
1
;
}
#else
int
handleInputFile
(
const
char
*
romName
,
const
unsigned
char
*
romData
,
int
romSize
)
{
int
size
;
initSysInfo
();
//initialize it all
//get ROM from binary ROM file
romFile
=
fopen
(
romName
,
"rb"
);
if
(
!
romFile
)
{
log_cb
(
RETRO_LOG_ERROR
,
"Couldn't open %s file
\n
"
,
romName
);
return
0
;
}
size
=
romSize
>
MAINROM_SIZE_MAX
?
MAINROM_SIZE_MAX
:
romSize
;
m_emuInfo
.
romSize
=
fread
(
mainrom
,
1
,
MAINROM_SIZE_MAX
,
romFile
);
strcpy
(
m_emuInfo
.
RomFileName
,
romName
)
;
m_emuInfo
.
romSize
=
size
;
memcpy
(
mainrom
,
romData
,
size
);
strcpy
(
m_emuInfo
.
RomFileName
,
romName
);
fclose
(
romFile
);
}
if
(
!
initRom
())
{
...
...
@@ -265,4 +254,3 @@ int handleInputFile(const char *romName,
setFlashSize
(
m_emuInfo
.
romSize
);
return
1
;
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment