Skip to content

Commit

Permalink
Merge branch 'master' into rcheevos11
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed Nov 2, 2023
2 parents 781c8a4 + 636a6e9 commit 7aae8c9
Show file tree
Hide file tree
Showing 59 changed files with 1,754 additions and 317 deletions.
4 changes: 4 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,10 @@ ifeq ($(HAVE_LAKKA_NIGHTLY), 1)
DEFINES += -DHAVE_LAKKA_NIGHTLY
endif

ifneq ($(HAVE_LAKKA_CANARY), "")
DEFINES += -DHAVE_LAKKA_CANARY=\"${HAVE_LAKKA_CANARY}\"
endif

ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/menu_setting.o \
menu/menu_driver.o \
Expand Down
5 changes: 5 additions & 0 deletions command.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <locale.h>
#ifdef HAVE_NETWORKING
#include <net/net_compat.h>
#include <net/net_socket.h>
Expand Down Expand Up @@ -1166,6 +1167,10 @@ bool command_event_save_config(
const char *str = path_exists ? config_path :
path_get(RARCH_PATH_CONFIG);

/* Workaround for libdecor 0.2.0 setting unwanted locale */
#if defined(HAVE_WAYLAND) && defined(HAVE_DYNAMIC)
setlocale(LC_NUMERIC,"C");
#endif
if (path_exists && config_save_file(config_path))
{
snprintf(s, len, "%s \"%s\".",
Expand Down
3 changes: 3 additions & 0 deletions config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@
#define MAXIMUM_FRAME_DELAY 19
#define DEFAULT_FRAME_DELAY_AUTO false

/* Try to sleep the spare time after frame is presented in order to reduce vsync CPU usage. */
#define DEFAULT_FRAME_REST false

/* Inserts black frame(s) inbetween frames.
* Useful for Higher Hz monitors (set to multiples of 60 Hz) who want to play 60 Hz
* material with eliminated ghosting. video_refresh_rate should still be configured
Expand Down
2 changes: 1 addition & 1 deletion configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,7 @@ static struct config_bool_setting *populate_settings_bool(
SETTING_BOOL("video_ctx_scaling", &settings->bools.video_ctx_scaling, true, DEFAULT_VIDEO_CTX_SCALING, false);
SETTING_BOOL("video_force_aspect", &settings->bools.video_force_aspect, true, DEFAULT_FORCE_ASPECT, false);
SETTING_BOOL("video_frame_delay_auto", &settings->bools.video_frame_delay_auto, true, DEFAULT_FRAME_DELAY_AUTO, false);
SETTING_BOOL("video_frame_rest", &settings->bools.video_frame_rest, true, DEFAULT_FRAME_REST, false);
#if defined(DINGUX)
SETTING_BOOL("video_dingux_ipu_keep_aspect", &settings->bools.video_dingux_ipu_keep_aspect, true, DEFAULT_DINGUX_IPU_KEEP_ASPECT, false);
#endif
Expand Down Expand Up @@ -1862,7 +1863,6 @@ static struct config_bool_setting *populate_settings_bool(
SETTING_BOOL("menu_unified_controls", &settings->bools.menu_unified_controls, true, false, false);
SETTING_BOOL("menu_disable_info_button", &settings->bools.menu_disable_info_button, true, false, false);
SETTING_BOOL("menu_disable_search_button", &settings->bools.menu_disable_search_button, true, false, false);
SETTING_BOOL("menu_throttle_framerate", &settings->bools.menu_throttle_framerate, true, true, false);
SETTING_BOOL("menu_linear_filter", &settings->bools.menu_linear_filter, true, DEFAULT_VIDEO_SMOOTH, false);
SETTING_BOOL("menu_horizontal_animation", &settings->bools.menu_horizontal_animation, true, DEFAULT_MENU_HORIZONTAL_ANIMATION, false);
SETTING_BOOL("menu_pause_libretro", &settings->bools.menu_pause_libretro, true, true, false);
Expand Down
3 changes: 1 addition & 2 deletions configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ typedef struct settings
bool video_ctx_scaling;
bool video_force_aspect;
bool video_frame_delay_auto;
bool video_frame_rest;
bool video_crop_overscan;
bool video_aspect_ratio_auto;
bool video_dingux_ipu_keep_aspect;
Expand Down Expand Up @@ -705,13 +706,11 @@ typedef struct settings
bool menu_core_enable;
bool menu_show_sublabels;
bool menu_dynamic_wallpaper_enable;
bool menu_throttle;
bool menu_mouse_enable;
bool menu_pointer_enable;
bool menu_navigation_wraparound_enable;
bool menu_navigation_browser_filter_supported_extensions_enable;
bool menu_show_advanced_settings;
bool menu_throttle_framerate;
bool menu_linear_filter;
bool menu_horizontal_animation;
bool menu_scroll_fast;
Expand Down
2 changes: 1 addition & 1 deletion cores/libretro-video-processor/video_processor_v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ enumerate_audio_devices(char *buf, size_t buflen)

RETRO_API void VIDEOPROC_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
{
bool no_content = true;
char video_devices[ENVVAR_BUFLEN];
char audio_devices[ENVVAR_BUFLEN];
struct retro_variable envvars[] = {
Expand All @@ -283,7 +284,6 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_set_environment)(retro_environment_t

VIDEOPROC_CORE_PREFIX(environment_cb) = cb;

bool no_content = true;
cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &no_content);

/* Allows retroarch to seed the previous values */
Expand Down
4 changes: 3 additions & 1 deletion file_path_special.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ RETRO_BEGIN_DECLS
#define FILE_PATH_LOBBY_LIBRETRO_URL "http://lobby.libretro.com/"
#define FILE_PATH_CORE_THUMBNAILS_URL "http://thumbnails.libretro.com"
#define FILE_PATH_CORE_THUMBNAILPACKS_URL "http://thumbnailpacks.libretro.com"
#ifdef HAVE_LAKKA_NIGHTLY
#ifdef HAVE_LAKKA_CANARY
#define FILE_PATH_LAKKA_URL HAVE_LAKKA_CANARY
#elif HAVE_LAKKA_NIGHTLY
#define FILE_PATH_LAKKA_URL "http://nightly.builds.lakka.tv/.updater"
#else
#define FILE_PATH_LAKKA_URL "http://le.builds.lakka.tv"
Expand Down
20 changes: 20 additions & 0 deletions gfx/common/wayland_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
#include "../../frontend/frontend_driver.h"
#include "../../verbosity.h"

#ifdef HAVE_DBUS
#include "dbus_common.h"
#endif

#define SPLASH_SHM_NAME "retroarch-wayland-vk-splash"

#define APP_ID "org.libretro.RetroArch"
Expand Down Expand Up @@ -282,6 +286,13 @@ void gfx_ctx_wl_destroy_resources_common(gfx_ctx_wayland_data_t *wl)
zxdg_decoration_manager_v1_destroy(wl->deco_manager);
if (wl->idle_inhibit_manager)
zwp_idle_inhibit_manager_v1_destroy(wl->idle_inhibit_manager);
else
{
#ifdef HAVE_DBUS
dbus_screensaver_uninhibit();
dbus_close_connection();
#endif
}
if (wl->pointer_constraints)
zwp_pointer_constraints_v1_destroy(wl->pointer_constraints);
if (wl->relative_pointer_manager)
Expand Down Expand Up @@ -659,6 +670,9 @@ bool gfx_ctx_wl_init_common(
if (!wl->idle_inhibit_manager)
{
RARCH_LOG("[Wayland]: Compositor doesn't support zwp_idle_inhibit_manager_v1 protocol\n");
#ifdef HAVE_DBUS
dbus_ensure_connection();
#endif
}

if (!wl->deco_manager)
Expand Down Expand Up @@ -878,7 +892,13 @@ bool gfx_ctx_wl_suppress_screensaver(void *data, bool state)
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;

if (!wl->idle_inhibit_manager)
#ifdef HAVE_DBUS
/* Some Wayland compositors (e.g. Phoc) don't implement Wayland's Idle protocol.
* They instead rely on things like Gnome Screensaver. */
return dbus_suspend_screensaver(state);
#else
return false;
#endif
if (state != (!!wl->idle_inhibitor))
{
if (state)
Expand Down
3 changes: 3 additions & 0 deletions gfx/drivers/sdl2_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,10 @@ static bool sdl2_gfx_focus(void *data)
return (SDL_GetWindowFlags(vid->window) & flags) == flags;
}

#if !defined(HAVE_X11)
static bool sdl2_gfx_suspend_screensaver(void *data, bool enable) { return false; }
#endif

/* TODO/FIXME - implement */
static bool sdl2_gfx_has_windowed(void *data) { return true; }

Expand Down
Loading

0 comments on commit 7aae8c9

Please sign in to comment.