mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 09:05:47 -04:00
Replace more instances of fopen() with FileSystem::OpenFile()
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#include "cpu_core.h"
|
||||
#include "common/align.h"
|
||||
#include "common/file_system.h"
|
||||
#include "common/log.h"
|
||||
#include "common/state_wrapper.h"
|
||||
#include "cpu_disasm.h"
|
||||
@ -53,7 +54,7 @@ void WriteToExecutionLog(const char* format, ...)
|
||||
|
||||
if (!log_file_opened)
|
||||
{
|
||||
log_file = std::fopen("cpu_log.txt", "wb");
|
||||
log_file = FileSystem::OpenCFile("cpu_log.txt", "wb");
|
||||
log_file_opened = true;
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ bool GameList::GetExeListEntry(const char* path, GameListEntry* entry)
|
||||
if (!FileSystem::StatFile(path, &ffd))
|
||||
return false;
|
||||
|
||||
std::FILE* fp = std::fopen(path, "rb");
|
||||
std::FILE* fp = FileSystem::OpenCFile(path, "rb");
|
||||
if (!fp)
|
||||
return false;
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "bus.h"
|
||||
#include "cdrom.h"
|
||||
#include "common/audio_stream.h"
|
||||
#include "common/file_system.h"
|
||||
#include "common/log.h"
|
||||
#include "common/state_wrapper.h"
|
||||
#include "common/string_util.h"
|
||||
@ -878,7 +879,7 @@ void ResetPerformanceCounters()
|
||||
|
||||
bool LoadEXE(const char* filename, std::vector<u8>& bios_image)
|
||||
{
|
||||
std::FILE* fp = std::fopen(filename, "rb");
|
||||
std::FILE* fp = FileSystem::OpenCFile(filename, "rb");
|
||||
if (!fp)
|
||||
return false;
|
||||
|
||||
@ -997,7 +998,7 @@ bool LoadPSF(const char* filename, std::vector<u8>& bios_image)
|
||||
|
||||
bool SetExpansionROM(const char* filename)
|
||||
{
|
||||
std::FILE* fp = std::fopen(filename, "rb");
|
||||
std::FILE* fp = FileSystem::OpenCFile(filename, "rb");
|
||||
if (!fp)
|
||||
{
|
||||
Log_ErrorPrintf("Failed to open '%s'", filename);
|
||||
|
Reference in New Issue
Block a user