mirror of
https://github.com/libretro/RetroArch
synced 2025-04-25 09:02:44 +00:00
commit
c0bb34fb8d
@ -22,6 +22,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../miscellaneous.h"
|
#include "../miscellaneous.h"
|
||||||
#include "../file_path.h"
|
#include "../file_path.h"
|
||||||
|
#include "7zip_support.h"
|
||||||
|
|
||||||
#include "../deps/7zip/7z.h"
|
#include "../deps/7zip/7z.h"
|
||||||
#include "../deps/7zip/7zAlloc.h"
|
#include "../deps/7zip/7zAlloc.h"
|
||||||
|
@ -36,7 +36,7 @@ enum
|
|||||||
RARCH_COMPRESSED_ARCHIVE,
|
RARCH_COMPRESSED_ARCHIVE,
|
||||||
RARCH_DIRECTORY,
|
RARCH_DIRECTORY,
|
||||||
RARCH_FILE_UNSUPPORTED,
|
RARCH_FILE_UNSUPPORTED,
|
||||||
} FILE_TYPES;
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_COMPRESSION
|
#ifdef HAVE_COMPRESSION
|
||||||
|
@ -312,7 +312,7 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
if (depth == 1 // if we are on subitems level
|
if (depth == 1 // if we are on subitems level
|
||||||
&& active_item->active_subitem < active_item->num_subitems -1 // and we do not exceed the number of subitems
|
&& active_item->active_subitem < active_item->num_subitems -1 // and we do not exceed the number of subitems
|
||||||
&& (menu_active_category == 0 // and we are in settings or a rom is launched
|
&& (menu_active_category == 0 // and we are in settings or a rom is launched
|
||||||
|| ((active_item->active_subitem < active_item->num_subitems -1) && (g_extern.main_is_init && !g_extern.libretro_dummy) && strcmp(g_extern.fullpath, &active_item->rom) == 0)))
|
|| ((active_item->active_subitem < active_item->num_subitems -1) && (g_extern.main_is_init && !g_extern.libretro_dummy) && strcmp(g_extern.fullpath, active_item->rom) == 0)))
|
||||||
{
|
{
|
||||||
active_item->active_subitem++;
|
active_item->active_subitem++;
|
||||||
lakka_switch_subitems();
|
lakka_switch_subitems();
|
||||||
|
@ -483,7 +483,7 @@ static void lakka_draw_subitems(int i, int j)
|
|||||||
|
|
||||||
if (k == 0 && g_extern.main_is_init
|
if (k == 0 && g_extern.main_is_init
|
||||||
&& !g_extern.libretro_dummy
|
&& !g_extern.libretro_dummy
|
||||||
&& strcmp(g_extern.fullpath, &active_item->rom) == 0)
|
&& strcmp(g_extern.fullpath, active_item->rom) == 0)
|
||||||
{
|
{
|
||||||
lakka_draw_icon(textures[TEXTURE_RESUME].id,
|
lakka_draw_icon(textures[TEXTURE_RESUME].id,
|
||||||
margin_left + hspacing*(i+2.25) +
|
margin_left + hspacing*(i+2.25) +
|
||||||
@ -503,7 +503,7 @@ static void lakka_draw_subitems(int i, int j)
|
|||||||
menu_active_category == 0 ||
|
menu_active_category == 0 ||
|
||||||
(g_extern.main_is_init &&
|
(g_extern.main_is_init &&
|
||||||
!g_extern.libretro_dummy &&
|
!g_extern.libretro_dummy &&
|
||||||
strcmp(g_extern.fullpath, &active_item->rom) == 0))
|
strcmp(g_extern.fullpath, active_item->rom) == 0))
|
||||||
{
|
{
|
||||||
lakka_draw_icon(subitem->icon,
|
lakka_draw_icon(subitem->icon,
|
||||||
margin_left + hspacing*(i+2.25) +
|
margin_left + hspacing*(i+2.25) +
|
||||||
|
@ -816,7 +816,7 @@ int menu_parse_and_resolve(file_list_t *list, file_list_t *menu_list)
|
|||||||
list_size = str_list->size;
|
list_size = str_list->size;
|
||||||
for (i = 0; i < str_list->size; i++)
|
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)
|
switch (str_list->elems[i].attr.i)
|
||||||
{
|
{
|
||||||
case RARCH_DIRECTORY:
|
case RARCH_DIRECTORY:
|
||||||
|
@ -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)
|
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)
|
static void sdl_ctx_show_mouse(void *data, bool state)
|
||||||
|
@ -104,9 +104,9 @@ static void registry_handle_global(void *data, struct wl_registry *reg, uint32_t
|
|||||||
(void)version;
|
(void)version;
|
||||||
|
|
||||||
if (!strcmp(interface, "wl_compositor"))
|
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"))
|
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,
|
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,
|
EGL_NONE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
EGLint egl_major = 0, egl_minor = 0;
|
||||||
|
EGLint num_configs;
|
||||||
const EGLint *attrib_ptr;
|
const EGLint *attrib_ptr;
|
||||||
|
|
||||||
switch (g_api)
|
switch (g_api)
|
||||||
{
|
{
|
||||||
case GFX_CTX_OPENGL_API:
|
case GFX_CTX_OPENGL_API:
|
||||||
@ -340,7 +343,6 @@ static bool gfx_ctx_init(void *data)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
EGLint egl_major = 0, egl_minor = 0;
|
|
||||||
if (!eglInitialize(g_egl_dpy, &egl_major, &egl_minor))
|
if (!eglInitialize(g_egl_dpy, &egl_major, &egl_minor))
|
||||||
{
|
{
|
||||||
RARCH_ERR("Failed to initialize EGL.\n");
|
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);
|
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))
|
if (!eglChooseConfig(g_egl_dpy, attrib_ptr, &g_config, 1, &num_configs))
|
||||||
{
|
{
|
||||||
RARCH_ERR("[Wayland/EGL]: eglChooseConfig failed with 0x%x.\n", eglGetError());
|
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,
|
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)
|
if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !g_wl_keyboard)
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ static uint8_t pad_get_button(sdl_joypad_t *pad, unsigned button)
|
|||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
/* TODO: see if a LUT like winxinput_joypad.c's button_index_to_bitmap_code is needed. */
|
/* TODO: see if a LUT like winxinput_joypad.c's button_index_to_bitmap_code is needed. */
|
||||||
if (pad->controller)
|
if (pad->controller)
|
||||||
return SDL_GameControllerGetButton(pad->controller, button);
|
return SDL_GameControllerGetButton(pad->controller, (SDL_GameControllerButton)button);
|
||||||
#endif
|
#endif
|
||||||
return SDL_JoystickGetButton(pad->joypad, button);
|
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
|
#ifdef HAVE_SDL2
|
||||||
/* TODO: see if a rarch <-> sdl translation is needed. */
|
/* TODO: see if a rarch <-> sdl translation is needed. */
|
||||||
if (pad->controller)
|
if (pad->controller)
|
||||||
return SDL_GameControllerGetAxis(pad->controller, axis);
|
return SDL_GameControllerGetAxis(pad->controller, (SDL_GameControllerAxis)axis);
|
||||||
#endif
|
#endif
|
||||||
return SDL_JoystickGetAxis(pad->joypad, axis);
|
return SDL_JoystickGetAxis(pad->joypad, axis);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user