mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
applied comments from PR: fixed comment style and moved variable declarations at the top
This commit is contained in:
parent
5fb77796f0
commit
7e5174eb72
@ -38,6 +38,8 @@
|
|||||||
void *fopen_utf8(const char * filename, const char * mode)
|
void *fopen_utf8(const char * filename, const char * mode)
|
||||||
{
|
{
|
||||||
const char * filename_local = NULL;
|
const char * filename_local = NULL;
|
||||||
|
const char* windows_long_prefix = "\\\\?\\";
|
||||||
|
char long_filename[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
#if defined(LEGACY_WIN32)
|
#if defined(LEGACY_WIN32)
|
||||||
FILE *ret = NULL;
|
FILE *ret = NULL;
|
||||||
@ -51,10 +53,10 @@ void *fopen_utf8(const char * filename, const char * mode)
|
|||||||
return ret;
|
return ret;
|
||||||
#else
|
#else
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// prefix to tell Windows to bypass the ~260 characters limit in many I/O APIs
|
/*
|
||||||
// https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
|
prefix to tell Windows to bypass the ~260 characters limit in many I/O APIs
|
||||||
const char * windows_long_prefix = "\\\\?\\";
|
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
|
||||||
char long_filename[PATH_MAX_LENGTH];
|
*/
|
||||||
snprintf(long_filename, PATH_MAX_LENGTH, "%s%s", windows_long_prefix, filename);
|
snprintf(long_filename, PATH_MAX_LENGTH, "%s%s", windows_long_prefix, filename);
|
||||||
filename_local = long_filename;
|
filename_local = long_filename;
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user