1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-26 12:12:02 +00:00
nxdumptool/source/util.h
Pablo Curiel 01a3ebe477 Some fixes and corrections.
* Fixed building using latest libnx commit + recently added pacman packages (switch-libxml2 and switch-libjson-c).
* Removed ncm-related code because libnx now includes what's needed by the application.
* Cleaned up the fs-srv service additional functions.
* Mounted partition filesystems are now properly closed.
* Changed some output text.
2018-07-21 01:56:00 -04:00

50 lines
1.1 KiB
C

#pragma once
#ifndef __UTIL_H__
#define __UTIL_H__
#include <switch.h>
#define APP_VERSION "1.0.6"
#define NAME_BUF_LEN 4096
#define SOCK_BUFFERSIZE 65536
#define META_DATABASE_FILTER 0x80 // Regular Application
bool isGameCardInserted(FsDeviceOperator* o);
void syncDisplay();
void delay(u8 seconds);
bool getGameCardTitleIDAndVersion(u64 *titleID, u32 *version);
void convertTitleVersionToDecimal(u32 version, char *versionBuf, int versionBufSize);
bool getGameCardControlNacp(u64 titleID, char *nameBuf, int nameBufSize, char *authorBuf, int authorBufSize);
int getSdCardFreeSpace(u64 *out);
void convertSize(u64 size, char *out, int bufsize);
void waitForButtonPress();
bool isDirectory(char *path);
void addString(char **filenames, int *filenamesCount, char **nextFilename, const char *string);
void getDirectoryContents(char *filenameBuffer, char **filenames, int *filenamesCount, const char *directory, bool skipParent);
void gameCardDumpNSWDBCheck(u32 crc);
void updateNSWDBXml();
void updateApplication();
void removeIllegalCharacters(char *name);
void strtrim(char *str);
#endif