(UWP VFS) Code formatting cleanups
This commit is contained in:
parent
79ffb53ef2
commit
dd016c44c9
|
@ -267,7 +267,8 @@ struct libretro_vfs_implementation_file
|
||||||
char* orig_path;
|
char* orig_path;
|
||||||
};
|
};
|
||||||
|
|
||||||
libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, unsigned mode, unsigned hints)
|
libretro_vfs_implementation_file *retro_vfs_file_open_impl(
|
||||||
|
const char *path, unsigned mode, unsigned hints)
|
||||||
{
|
{
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
char *dirpath = NULL;
|
char *dirpath = NULL;
|
||||||
|
@ -299,15 +300,16 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns
|
||||||
dirpath_wide = utf8_to_utf16_string_alloc(dirpath);
|
dirpath_wide = utf8_to_utf16_string_alloc(dirpath);
|
||||||
windowsize_path(dirpath_wide);
|
windowsize_path(dirpath_wide);
|
||||||
Platform::String^ dirpath_str = ref new Platform::String(dirpath_wide);
|
Platform::String^ dirpath_str = ref new Platform::String(dirpath_wide);
|
||||||
free(dirpath_wide);
|
|
||||||
free(dirpath);
|
|
||||||
|
|
||||||
filename = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
filename = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||||
fill_pathname_base(filename, path, PATH_MAX_LENGTH);
|
fill_pathname_base(filename, path, PATH_MAX_LENGTH);
|
||||||
filename_wide = utf8_to_utf16_string_alloc(filename);
|
filename_wide = utf8_to_utf16_string_alloc(filename);
|
||||||
Platform::String^ filename_str = ref new Platform::String(filename_wide);
|
Platform::String^ filename_str = ref new Platform::String(filename_wide);
|
||||||
|
|
||||||
free(filename_wide);
|
free(filename_wide);
|
||||||
free(filename);
|
free(filename);
|
||||||
|
free(dirpath_wide);
|
||||||
|
free(dirpath);
|
||||||
|
|
||||||
retro_assert(!dirpath_str->IsEmpty() && !filename_str->IsEmpty());
|
retro_assert(!dirpath_str->IsEmpty() && !filename_str->IsEmpty());
|
||||||
|
|
||||||
|
@ -558,7 +560,10 @@ int retro_vfs_file_rename_impl(const char *old_path, const char *new_path)
|
||||||
free(new_file_name_wide);
|
free(new_file_name_wide);
|
||||||
free(new_file_name);
|
free(new_file_name);
|
||||||
|
|
||||||
retro_assert(!old_path_str->IsEmpty() && !new_dir_path_str->IsEmpty() && !new_file_name_str->IsEmpty());
|
retro_assert(
|
||||||
|
!old_path_str->IsEmpty()
|
||||||
|
&& !new_dir_path_str->IsEmpty()
|
||||||
|
&& !new_file_name_str->IsEmpty());
|
||||||
|
|
||||||
return RunAsyncAndCatchErrors<int>([=]() {
|
return RunAsyncAndCatchErrors<int>([=]() {
|
||||||
concurrency::task<StorageFile^> old_file_task = concurrency::create_task(LocateStorageItem<StorageFile>(old_path_str));
|
concurrency::task<StorageFile^> old_file_task = concurrency::create_task(LocateStorageItem<StorageFile>(old_path_str));
|
||||||
|
|
Loading…
Reference in New Issue