This commit is contained in:
Ray
2026-09-08 18:22:22 +02:00
parent 2b991b0243
commit f25c8241f3
2 changed files with 17 additions and 15 deletions

View File

@@ -1151,7 +1151,7 @@ Image GetClipboardImage(void)
fileData = (void *)Win32GetClipboardImageData(&width, &height, &dataSize);
if (fileData == NULL) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data.");
else
else
{
image = LoadImageFromMemory(".bmp", (const unsigned char*)fileData, (int)dataSize);

View File

@@ -260,8 +260,9 @@ int main(int argc, char *argv[])
for (int i = 0; i < lineCount; i++)
{
int j = 0;
while ((lines[i][j] == ' ') || (lines[i][j] == '\t')) j++; // skip spaces and tabs in the beginning
// Read define line
while ((lines[i][j] == ' ') || (lines[i][j] == '\t')) j++; // Skip spaces and tabs in the beginning
// Read one define line
if (IsTextEqual(lines[i]+j, "#define ", 8))
{
// Keep the line position in the array of lines,
@@ -289,8 +290,10 @@ int main(int argc, char *argv[])
if (v == '{') validStruct = true;
if ((v == '{') || (v == ';') || (v == '\0')) break;
}
continue;
}
if (!validStruct) continue;
structLines[structCount] = i;
while (lines[i][0] != '}') i++;
while (lines[i][0] != '\0') i++;
@@ -314,7 +317,9 @@ int main(int argc, char *argv[])
if ((v == ';') && (spaceCount == 2)) validAlias = true;
if ((v == ';') || (v == '(') || (v == '\0')) break;
}
if (!validAlias) continue;
aliasLines[aliasCount] = i;
aliasCount++;
}
@@ -444,6 +449,7 @@ int main(int argc, char *argv[])
(ch == '-'))) isNumber = false;
j++;
}
if (isNumber)
{
if (isFloat)
@@ -600,6 +606,7 @@ int main(int argc, char *argv[])
defineIndex++;
}
defineCount = defineIndex;
free(defineLines);
@@ -614,7 +621,7 @@ int main(int argc, char *argv[])
GetDescription(linesPtr[-1], structs[i].desc);
// Get struct name: typedef struct name {
const int TDS_LEN = 15; // length of "typedef struct "
const int TDS_LEN = 15; // Length of "typedef struct "
for (int c = TDS_LEN; c < 64 + TDS_LEN; c++)
{
if ((linesPtr[0][c] == '{') || (linesPtr[0][c] == ' '))
@@ -640,8 +647,6 @@ int main(int argc, char *argv[])
if ((fieldLine[0] != '/') && !IsTextEqual(fieldLine, "struct", 6)) // Field line is not a comment and not a struct declaration
{
//printf("Struct field: %s_\n", fieldLine); // OK!
// Get struct field type and name
GetDataTypeAndName(fieldLine, fieldEndPos, structs[i].fieldType[structs[i].fieldCount], structs[i].fieldName[structs[i].fieldCount]);
@@ -778,12 +783,12 @@ int main(int argc, char *argv[])
int typeStart = c;
while(linePtr[c] != ' ') c++;
int typeLen = c - typeStart;
// Skip space
c++;
c++;
// Maybe type pointer part
if (linePtr[c] == '*')
if (linePtr[c] == '*')
{
while(linePtr[c] == '*') c++;
typeLen = c - typeStart;
@@ -1020,10 +1025,7 @@ int main(int argc, char *argv[])
((linePtr[c - 4] == 'v') &&
(linePtr[c - 3] == 'o') &&
(linePtr[c - 2] == 'i') &&
(linePtr[c - 1] == 'd')))
{
break;
}
(linePtr[c - 1] == 'd'))) break;
// Get parameter type + name, extract info
char funcParamTypeName[128] = { 0 };