(C89_BUILD) Some buildfixes

This commit is contained in:
twinaphex 2015-09-18 06:51:17 +02:00
parent e25f3494ba
commit aed85c1617
4 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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++)

View File

@ -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

View File

@ -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);