Code tweaks
This commit is contained in:
parent
550dd40cb3
commit
72431c6c36
2 changed files with 19 additions and 17 deletions
|
@ -331,6 +331,7 @@ static int currentMouseWheelY = 0; // Registers current mouse wheel
|
||||||
|
|
||||||
#if defined(PLATFORM_RPI)
|
#if defined(PLATFORM_RPI)
|
||||||
static char currentMouseStateEvdev[3] = { 0 }; // Holds the new mouse state for the next polling event to grab (Can't be written directly due to multithreading, app could miss the update)
|
static char currentMouseStateEvdev[3] = { 0 }; // Holds the new mouse state for the next polling event to grab (Can't be written directly due to multithreading, app could miss the update)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
pthread_t threadId; // Event reading thread id
|
pthread_t threadId; // Event reading thread id
|
||||||
int fd; // File descriptor to the device it is assigned to
|
int fd; // File descriptor to the device it is assigned to
|
||||||
|
|
|
@ -316,6 +316,7 @@ Font LoadFontEx(const char *fileName, int fontSize, int charsCount, int *fontCha
|
||||||
font.texture = LoadTextureFromImage(atlas);
|
font.texture = LoadTextureFromImage(atlas);
|
||||||
UnloadImage(atlas);
|
UnloadImage(atlas);
|
||||||
}
|
}
|
||||||
|
else font = GetFontDefault();
|
||||||
|
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
@ -368,11 +369,11 @@ CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int c
|
||||||
// Fill fontChars in case not provided externally
|
// Fill fontChars in case not provided externally
|
||||||
// NOTE: By default we fill charsCount consecutevely, starting at 32 (Space)
|
// NOTE: By default we fill charsCount consecutevely, starting at 32 (Space)
|
||||||
int genFontChars = false;
|
int genFontChars = false;
|
||||||
if (fontChars == NULL) genFontChars = true;
|
if (fontChars == NULL)
|
||||||
if (genFontChars)
|
|
||||||
{
|
{
|
||||||
fontChars = (int *)malloc(charsCount*sizeof(int));
|
fontChars = (int *)malloc(charsCount*sizeof(int));
|
||||||
for (int i = 0; i < charsCount; i++) fontChars[i] = i + 32;
|
for (int i = 0; i < charsCount; i++) fontChars[i] = i + 32;
|
||||||
|
genFontChars = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
chars = (CharInfo *)malloc(charsCount*sizeof(CharInfo));
|
chars = (CharInfo *)malloc(charsCount*sizeof(CharInfo));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue