C++ build fixes

This commit is contained in:
Higor Eurípedes 2014-09-06 22:14:09 -03:00
parent e716d1dabc
commit 1833467c2c
5 changed files with 11 additions and 9 deletions

View File

@ -22,6 +22,7 @@
#include <string.h>
#include "../miscellaneous.h"
#include "../file_path.h"
#include "7zip_support.h"
#include "../deps/7zip/7z.h"
#include "../deps/7zip/7zAlloc.h"

View File

@ -816,7 +816,7 @@ int menu_parse_and_resolve(file_list_t *list, file_list_t *menu_list)
list_size = str_list->size;
for (i = 0; i < str_list->size; i++)
{
menu_file_type_t file_type = 0;
menu_file_type_t file_type = MENU_FILE_NONE;
switch (str_list->elems[i].attr.i)
{
case RARCH_DIRECTORY:

View File

@ -352,7 +352,7 @@ static void sdl_ctx_input_driver(void *data, const input_driver_t **input, void
static gfx_ctx_proc_t sdl_ctx_get_proc_address(const char *name)
{
return SDL_GL_GetProcAddress(name);
return (gfx_ctx_proc_t)SDL_GL_GetProcAddress(name);
}
static void sdl_ctx_show_mouse(void *data, bool state)

View File

@ -104,9 +104,9 @@ static void registry_handle_global(void *data, struct wl_registry *reg, uint32_t
(void)version;
if (!strcmp(interface, "wl_compositor"))
g_compositor = wl_registry_bind(reg, id, &wl_compositor_interface, 1);
g_compositor = (struct wl_compositor*)wl_registry_bind(reg, id, &wl_compositor_interface, 1);
else if (!strcmp(interface, "wl_shell"))
g_shell = wl_registry_bind(reg, id, &wl_shell_interface, 1);
g_shell = (struct wl_shell*)wl_registry_bind(reg, id, &wl_shell_interface, 1);
}
static void registry_handle_global_remove(void *data, struct wl_registry *registry,
@ -285,7 +285,10 @@ static bool gfx_ctx_init(void *data)
EGL_NONE,
};
EGLint egl_major = 0, egl_minor = 0;
EGLint num_configs;
const EGLint *attrib_ptr;
switch (g_api)
{
case GFX_CTX_OPENGL_API:
@ -340,7 +343,6 @@ static bool gfx_ctx_init(void *data)
goto error;
}
EGLint egl_major = 0, egl_minor = 0;
if (!eglInitialize(g_egl_dpy, &egl_major, &egl_minor))
{
RARCH_ERR("Failed to initialize EGL.\n");
@ -348,7 +350,6 @@ static bool gfx_ctx_init(void *data)
}
RARCH_LOG("[Wayland/EGL]: EGL version: %d.%d\n", egl_major, egl_minor);
EGLint num_configs;
if (!eglChooseConfig(g_egl_dpy, attrib_ptr, &g_config, 1, &num_configs))
{
RARCH_ERR("[Wayland/EGL]: eglChooseConfig failed with 0x%x.\n", eglGetError());
@ -717,7 +718,7 @@ static const struct wl_pointer_listener pointer_listener = {
};
static void seat_handle_capabilities(void *data,
struct wl_seat *seat, enum wl_seat_capability caps)
struct wl_seat *seat, unsigned caps)
{
if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !g_wl_keyboard)
{

View File

@ -60,7 +60,7 @@ static uint8_t pad_get_button(sdl_joypad_t *pad, unsigned button)
#ifdef HAVE_SDL2
/* TODO: see if a LUT like winxinput_joypad.c's button_index_to_bitmap_code is needed. */
if (pad->controller)
return SDL_GameControllerGetButton(pad->controller, button);
return SDL_GameControllerGetButton(pad->controller, (SDL_GameControllerButton)button);
#endif
return SDL_JoystickGetButton(pad->joypad, button);
}
@ -79,7 +79,7 @@ static int16_t pad_get_axis(sdl_joypad_t *pad, unsigned axis)
#ifdef HAVE_SDL2
/* TODO: see if a rarch <-> sdl translation is needed. */
if (pad->controller)
return SDL_GameControllerGetAxis(pad->controller, axis);
return SDL_GameControllerGetAxis(pad->controller, (SDL_GameControllerAxis)axis);
#endif
return SDL_JoystickGetAxis(pad->joypad, axis);
}