libretro / desmume

DeSmuME is a Nintendo DS emulator
http://desmume.org
GNU General Public License v2.0
35 stars 33 forks source link

Adding VFS support #46

Closed claudiuslollarius closed 5 years ago

claudiuslollarius commented 6 years ago

Added VFS support to core.

A few points to note:

Tested against current Retroarch without VFS v2 support, which means fallback implementation (which is what RetroArch would end up using) should work.

inactive123 commented 6 years ago

@bearoso Would appreciate if you could give this a quick look.

bearoso commented 6 years ago

This doesn't build for me on Linux. There's one section that stat_utf8 is used when _WIN32 isn't defined, but it was removable. The big problem is all the ambiguity with the fclass functions in emufile.h. Whatever's getting by with MSVC isn't going to fly with other compilers. That needs to be more thought out, not poked at until it sort of works.

claudiuslollarius commented 6 years ago

@bearoso I have reworked the PR to work around the ambiguities between emufile and stdio: now codebase compiles and runs using either GCC or MSVC.

bearoso commented 6 years ago

I still need to remove the #ifndef _WIN32 block in ROMReader.cpp:STDROMReaderInit to compile. You can probably delete it, because I don't think it's necessary.

Personally, I would've just replaced the stdio file functions with the rfile functions universally and removed the aliases. But it does work now.

claudiuslollarius commented 6 years ago

@bearoso Ok, removed the code block in STDROMReaderInit as you recommended.

claudiuslollarius commented 5 years ago

@twinaphex Any idea if this can move forward?

bearoso commented 5 years ago

Whoops, sorry about forgetting you. It works fine now, so I'll merge it.