[PATCH] Fix some C++ build issues.
This commit is contained in:
parent
3c9e97842e
commit
9ed2ba8412
|
@ -137,7 +137,7 @@ int read_zip_file(const char * archive_path,
|
||||||
*buf = malloc(file_info.uncompressed_size + 1 );
|
*buf = malloc(file_info.uncompressed_size + 1 );
|
||||||
|
|
||||||
bytes_read = unzReadCurrentFile( zipfile, *buf, file_info.uncompressed_size );
|
bytes_read = unzReadCurrentFile( zipfile, *buf, file_info.uncompressed_size );
|
||||||
if (bytes_read != file_info.uncompressed_size)
|
if (bytes_read != (ssize_t)file_info.uncompressed_size)
|
||||||
{
|
{
|
||||||
RARCH_ERR(
|
RARCH_ERR(
|
||||||
"We tried to read %d bytes, but only got %d of file %s in zip %s.\n",
|
"We tried to read %d bytes, but only got %d of file %s in zip %s.\n",
|
||||||
|
|
|
@ -177,7 +177,8 @@ bool main_load_content(int argc, char **argv, args_type() args,
|
||||||
process_args_t process_args)
|
process_args_t process_args)
|
||||||
{
|
{
|
||||||
bool retval = true;
|
bool retval = true;
|
||||||
int i, ret = 0, rarch_argc = 0;
|
int ret = 0, rarch_argc = 0;
|
||||||
|
unsigned i;
|
||||||
char *rarch_argv[MAX_ARGS] = {NULL};
|
char *rarch_argv[MAX_ARGS] = {NULL};
|
||||||
char *argv_copy [MAX_ARGS] = {NULL};
|
char *argv_copy [MAX_ARGS] = {NULL};
|
||||||
char **rarch_argv_ptr = (char**)argv;
|
char **rarch_argv_ptr = (char**)argv;
|
||||||
|
|
|
@ -1121,18 +1121,18 @@ static bool gl_glsl_set_mvp(void *data, const math_matrix_4x4 *mat)
|
||||||
(void)data;
|
(void)data;
|
||||||
|
|
||||||
if (!glsl || !glsl->glsl_shader->modern)
|
if (!glsl || !glsl->glsl_shader->modern)
|
||||||
goto fallback;
|
{
|
||||||
|
#ifndef NO_GL_FF_MATRIX
|
||||||
|
gl_ff_matrix(mat);
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int loc = glsl->gl_uniforms[glsl->glsl_active_index].mvp;
|
int loc = glsl->gl_uniforms[glsl->glsl_active_index].mvp;
|
||||||
if (loc >= 0)
|
if (loc >= 0)
|
||||||
glUniformMatrix4fv(loc, 1, GL_FALSE, mat->data);
|
glUniformMatrix4fv(loc, 1, GL_FALSE, mat->data);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
fallback:
|
|
||||||
#ifndef NO_GL_FF_MATRIX
|
|
||||||
gl_ff_matrix(mat);
|
|
||||||
#endif
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gl_glsl_set_coords(const void *data)
|
static bool gl_glsl_set_coords(const void *data)
|
||||||
|
@ -1141,7 +1141,12 @@ static bool gl_glsl_set_coords(const void *data)
|
||||||
glsl_shader_data_t *glsl = (glsl_shader_data_t*)driver.video_shader_data;
|
glsl_shader_data_t *glsl = (glsl_shader_data_t*)driver.video_shader_data;
|
||||||
|
|
||||||
if (!glsl || !glsl->glsl_shader->modern || !coords)
|
if (!glsl || !glsl->glsl_shader->modern || !coords)
|
||||||
goto fallback;
|
{
|
||||||
|
#ifndef NO_GL_FF_VERTEX
|
||||||
|
gl_ff_vertex(coords);
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* Avoid hitting malloc on every single regular quad draw. */
|
/* Avoid hitting malloc on every single regular quad draw. */
|
||||||
GLfloat short_buffer[4 * (2 + 2 + 4 + 2)];
|
GLfloat short_buffer[4 * (2 + 2 + 4 + 2)];
|
||||||
|
@ -1151,7 +1156,12 @@ static bool gl_glsl_set_coords(const void *data)
|
||||||
(2 + 2 + 4 + 2), sizeof(*buffer));
|
(2 + 2 + 4 + 2), sizeof(*buffer));
|
||||||
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
goto fallback;
|
{
|
||||||
|
#ifndef NO_GL_FF_VERTEX
|
||||||
|
gl_ff_vertex(coords);
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
|
|
||||||
|
@ -1226,11 +1236,6 @@ static bool gl_glsl_set_coords(const void *data)
|
||||||
if (buffer != short_buffer)
|
if (buffer != short_buffer)
|
||||||
free(buffer);
|
free(buffer);
|
||||||
return true;
|
return true;
|
||||||
fallback:
|
|
||||||
#ifndef NO_GL_FF_VERTEX
|
|
||||||
gl_ff_vertex(coords);
|
|
||||||
#endif
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gl_glsl_use(void *data, unsigned idx)
|
static void gl_glsl_use(void *data, unsigned idx)
|
||||||
|
|
|
@ -41,7 +41,7 @@ void handle_xkb(
|
||||||
mod |= xkb_state_mod_index_is_active(
|
mod |= xkb_state_mod_index_is_active(
|
||||||
xkb_state,
|
xkb_state,
|
||||||
*map_idx,
|
*map_idx,
|
||||||
(XKB_STATE_MODS_EFFECTIVE) > 0) ? *map_bit : 0;
|
(enum xkb_state_component)((XKB_STATE_MODS_EFFECTIVE) > 0)) ? *map_bit : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
input_keyboard_event(value, input_translate_keysym_to_rk(code),
|
input_keyboard_event(value, input_translate_keysym_to_rk(code),
|
||||||
|
|
Loading…
Reference in New Issue