@@ -82,21 +82,20 @@ int main()
82
82
// Check if a file is dropped
83
83
if (IsFileDropped ())
84
84
{
85
- int fileCount = 0 ;
86
- char * * droppedFiles = LoadDroppedFiles (& fileCount );
85
+ FilePathList droppedFiles = LoadDroppedFiles ();
87
86
88
87
// Check file extensions for drag-and-drop
89
- if ((fileCount == 1 ) && IsFileExtension (droppedFiles [0 ], ".raw" ))
88
+ if ((droppedFiles . count == 1 ) && IsFileExtension (droppedFiles . paths [0 ], ".raw" ))
90
89
{
91
- FILE * imageFile = fopen (droppedFiles [0 ], "rb" );
90
+ FILE * imageFile = fopen (droppedFiles . paths [0 ], "rb" );
92
91
fseek (imageFile , 0L , SEEK_END );
93
92
dataSize = ftell (imageFile );
94
93
fclose (imageFile );
95
94
96
95
// NOTE: Returned string is just a pointer to droppedFiles[0],
97
96
// we need to make a copy of that data somewhere else: fileName
98
- strcpy (fileNamePath , droppedFiles [0 ]);
99
- strcpy (fileName , GetFileName (droppedFiles [0 ]));
97
+ strcpy (fileNamePath , droppedFiles . paths [0 ]);
98
+ strcpy (fileName , GetFileName (droppedFiles . paths [0 ]));
100
99
101
100
// Try to guess possible raw values
102
101
// Let's assume image is square, RGBA, 8 bit per channel
@@ -108,7 +107,7 @@ int main()
108
107
importWindowActive = true;
109
108
}
110
109
111
- UnloadDroppedFiles ();
110
+ UnloadDroppedFiles (droppedFiles );
112
111
}
113
112
114
113
// Check if load button has been pressed
0 commit comments