mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-18 08:52:41 +00:00
(C89_BUILD) Some buildfixes
This commit is contained in:
parent
e25f3494ba
commit
aed85c1617
@ -99,13 +99,13 @@ static bool font_renderer_stb_create_atlas(stb_font_renderer_t *self,
|
||||
g->width = c->x1 - c->x0;
|
||||
g->height = c->y1 - c->y0;
|
||||
|
||||
/* make sure important characters fit */
|
||||
/* Make sure important characters fit */
|
||||
if (isalnum(i) && (!g->width || !g->height))
|
||||
{
|
||||
int new_width = width * 1.2;
|
||||
int new_height = height * 1.2;
|
||||
|
||||
/* limit growth to 2048x2048 unless we already reached that */
|
||||
/* Limit growth to 2048x2048 unless we already reached that */
|
||||
if (width < 2048 || height < 2048)
|
||||
{
|
||||
new_width = min(new_width, 2048);
|
||||
@ -156,7 +156,7 @@ static void *font_renderer_stb_init(const char *font_path, float font_size)
|
||||
goto error;
|
||||
|
||||
stbtt_GetFontVMetrics(&info, &ascent, &descent, &line_gap);
|
||||
self->line_height = ascent - descent;// + line_gap;
|
||||
self->line_height = ascent - descent;
|
||||
|
||||
if (font_size < 0)
|
||||
self->line_height *= stbtt_ScaleForMappingEmToPixels(&info, -font_size);
|
||||
|
@ -273,10 +273,10 @@ static const unsigned buttons[] = {
|
||||
static void state_tracker_update_input(state_tracker_t *tracker)
|
||||
{
|
||||
unsigned i;
|
||||
const struct retro_keybind *binds[MAX_USERS];;
|
||||
uint16_t state[2] = {0};
|
||||
const struct retro_keybind *binds[MAX_USERS];
|
||||
settings_t *settings = config_get_ptr();
|
||||
driver_t *driver = driver_get_ptr();
|
||||
driver_t *driver = driver_get_ptr();
|
||||
uint16_t state[2] = {0};
|
||||
|
||||
/* Only bind for up to two players for now. */
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
// Pre-MSVC 2015 compilers don't implement snprintf in a cross-platform manner.
|
||||
/* Pre-MSVC 2015 compilers don't implement snprintf in a cross-platform manner. */
|
||||
#if _MSC_VER < 1900
|
||||
#ifndef snprintf
|
||||
#define snprintf _snprintf
|
||||
|
@ -40,7 +40,7 @@ enum
|
||||
{
|
||||
RFILE_MODE_READ = 0,
|
||||
RFILE_MODE_WRITE,
|
||||
RFILE_MODE_READ_WRITE,
|
||||
RFILE_MODE_READ_WRITE
|
||||
};
|
||||
|
||||
RFILE *retro_fopen(const char *path, unsigned mode, ssize_t len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user