mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-07 20:08:14 +00:00
ADDED: UnloadFileData() / UnloadFileText() #1440
This commit is contained in:
12
src/utils.c
12
src/utils.c
@@ -203,6 +203,12 @@ unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead)
|
||||
return data;
|
||||
}
|
||||
|
||||
// Unload file data allocated by LoadFileData()
|
||||
void UnloadFileData(unsigned char *data)
|
||||
{
|
||||
RL_FREE(data);
|
||||
}
|
||||
|
||||
// Save data to file from buffer
|
||||
bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite)
|
||||
{
|
||||
@@ -274,6 +280,12 @@ char *LoadFileText(const char *fileName)
|
||||
return text;
|
||||
}
|
||||
|
||||
// Unload file text data allocated by LoadFileText()
|
||||
void UnloadFileText(unsigned char *text)
|
||||
{
|
||||
RL_FREE(text);
|
||||
}
|
||||
|
||||
// Save text data to file (write), string must be '\0' terminated
|
||||
bool SaveFileText(const char *fileName, char *text)
|
||||
{
|
||||
|
Reference in New Issue
Block a user