OS Specific path seperator char (#316)
* OS Specific path seperator char Adds OS specific path seperator char * Update gui_window_file_dialog.h * Update custom_file_dialog.c
This commit is contained in:
parent
3d20f06bf2
commit
7567816d3e
@ -61,7 +61,7 @@ int main()
|
|||||||
// Load image file (if supported extension)
|
// Load image file (if supported extension)
|
||||||
if (IsFileExtension(fileDialogState.fileNameText, ".png"))
|
if (IsFileExtension(fileDialogState.fileNameText, ".png"))
|
||||||
{
|
{
|
||||||
strcpy(fileNameToLoad, TextFormat("%s/%s", fileDialogState.dirPathText, fileDialogState.fileNameText));
|
strcpy(fileNameToLoad, TextFormat("%s" PATH_SEPERATOR "%s", fileDialogState.dirPathText, fileDialogState.fileNameText));
|
||||||
UnloadTexture(texture);
|
UnloadTexture(texture);
|
||||||
texture = LoadTexture(fileNameToLoad);
|
texture = LoadTexture(fileNameToLoad);
|
||||||
}
|
}
|
||||||
|
@ -126,6 +126,11 @@ void GuiWindowFileDialog(GuiWindowFileDialogState *state);
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
#define MAX_DIRECTORY_FILES 2048
|
#define MAX_DIRECTORY_FILES 2048
|
||||||
#define MAX_ICON_PATH_LENGTH 512
|
#define MAX_ICON_PATH_LENGTH 512
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define PATH_SEPERATOR "\\"
|
||||||
|
#else
|
||||||
|
#define PATH_SEPERATOR "/"
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Types and Structures Definition
|
// Types and Structures Definition
|
||||||
|
Loading…
x
Reference in New Issue
Block a user