minor non-functional fixes

This commit is contained in:
Philippe G
2021-12-18 23:30:55 -08:00
parent 975f34f01b
commit 7f57cd5338
5 changed files with 6 additions and 57 deletions

View File

@@ -98,7 +98,7 @@ void GDS_FontDrawChar( struct GDS_Device* Device, char Character, int x, int y,
}
}
struct GDS_FontDef* GDS_SetFont( struct GDS_Device* Display, const struct GDS_FontDef* Font ) {
const struct GDS_FontDef* GDS_SetFont( struct GDS_Device* Display, const struct GDS_FontDef* Font ) {
const struct GDS_FontDef* OldFont = Display->Font;
Display->FontForceProportional = false;

View File

@@ -46,7 +46,7 @@ typedef enum {
TextAnchor_Center
} TextAnchor;
struct GDS_FontDef* GDS_SetFont( struct GDS_Device* Display, const struct GDS_FontDef* Font );
const struct GDS_FontDef* GDS_SetFont( struct GDS_Device* Display, const struct GDS_FontDef* Font );
void GDS_FontForceProportional( struct GDS_Device* Display, bool Force );
void GDS_FontForceMonospace( struct GDS_Device* Display, bool Force );

View File

@@ -125,7 +125,7 @@ bool GDS_TextLine(struct GDS_Device* Device, int N, int Pos, int Attr, char *Tex
*
*/
int GDS_GetTextWidth(struct GDS_Device* Device, int N, int Attr, char *Text) {
struct GDS_FontDef *Font = GDS_SetFont( Device, Device->Lines[N-1].Font );
const struct GDS_FontDef *Font = GDS_SetFont( Device, Device->Lines[N-1].Font );
if (Attr & GDS_TEXT_MONOSPACE) GDS_FontForceMonospace( Device, true );
int Width = GDS_FontMeasureString( Device, Text );