diff --git a/examples/custom_file_dialog/custom_file_dialog.c b/examples/custom_file_dialog/custom_file_dialog.c index cbb115d..9762530 100644 --- a/examples/custom_file_dialog/custom_file_dialog.c +++ b/examples/custom_file_dialog/custom_file_dialog.c @@ -61,7 +61,7 @@ int main() // Load image file (if supported extension) 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); texture = LoadTexture(fileNameToLoad); } diff --git a/examples/custom_file_dialog/gui_window_file_dialog.h b/examples/custom_file_dialog/gui_window_file_dialog.h index 27a376c..769e095 100644 --- a/examples/custom_file_dialog/gui_window_file_dialog.h +++ b/examples/custom_file_dialog/gui_window_file_dialog.h @@ -126,6 +126,11 @@ void GuiWindowFileDialog(GuiWindowFileDialogState *state); //---------------------------------------------------------------------------------- #define MAX_DIRECTORY_FILES 2048 #define MAX_ICON_PATH_LENGTH 512 +#ifdef _WIN32 +#define PATH_SEPERATOR "\\" +#else +#define PATH_SEPERATOR "/" +#endif //---------------------------------------------------------------------------------- // Types and Structures Definition