Skip to content

Commit

Permalink
Merge remote-tracking branch 'RetroArch_Official/master' into RetroAr…
Browse files Browse the repository at this point in the history
…chTesting
  • Loading branch information
Misunderstood-Wookiee committed Jun 5, 2024
2 parents 9290378 + cf6aef1 commit ce2a9ad
Show file tree
Hide file tree
Showing 44 changed files with 298 additions and 132 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Future

# 1.19.1
- (WASAPI) Only write when running and fix deadlock

# 1.19.0
- AI: Revert AI translation to previous version (fix for translation not working with HW rendered cores)
- APPLE: Try to use system preferred language
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ install: $(TARGET)
cp tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
cp retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
cp com.libretro.RetroArch.appdata.xml $(DESTDIR)$(DATA_DIR)/metainfo
cp retroarch.desktop $(DESTDIR)$(DATA_DIR)/applications
cp org.libretro.RetroArch.desktop $(DESTDIR)$(DATA_DIR)/applications
cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
cp docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
cp media/retroarch.svg $(DESTDIR)$(DATA_DIR)/pixmaps
Expand All @@ -249,7 +249,7 @@ install: $(TARGET)
chmod 755 $(DESTDIR)$(BIN_DIR)/$(TARGET)
chmod 755 $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
chmod 644 $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/org.libretro.RetroArch.desktop
chmod 644 $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.appdata.xml
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
Expand All @@ -274,7 +274,7 @@ uninstall:
rm -f $(DESTDIR)$(BIN_DIR)/$(TARGET)
rm -f $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
rm -f $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
rm -f $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
rm -f $(DESTDIR)$(DATA_DIR)/applications/org.libretro.RetroArch.desktop
rm -f $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.appdata.xml
rm -f $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
rm -f $(DESTDIR)$(DOC_DIR)/COPYING
Expand Down
4 changes: 2 additions & 2 deletions Makefile.lfx000
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ install: $(TARGET)
cp tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
cp retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
cp com.libretro.RetroArch.appdata.xml $(DESTDIR)$(DATA_DIR)/metainfo
cp retroarch.desktop $(DESTDIR)$(DATA_DIR)/applications
cp org.libretro.RetroArch.desktop $(DESTDIR)$(DATA_DIR)/applications
cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
cp docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
cp media/retroarch.svg $(DESTDIR)$(DATA_DIR)/pixmaps
Expand All @@ -223,7 +223,7 @@ install: $(TARGET)
chmod 755 $(DESTDIR)$(BIN_DIR)/$(TARGET)
chmod 755 $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
chmod 644 $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/org.libretro.RetroArch.desktop
chmod 644 $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.appdata.xml
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ RetroArch has been ported to the following platforms:
- FreeBSD
- Haiku
- Linux
- Original Microsoft Xbox
- Microsoft Xbox 360 (Libxenon/XeXDK)
- Microsoft Xbox One
- Microsoft Xbox Series S/X
- Miyoo
- NetBSD
- Nintendo 3DS/2DS
- Nintendo GameCube
- Nintendo NES/SNES Classic Edition
- Nintendo Switch
- Nintendo GameCube
- Nintendo Wii
- Nintendo Switch
- Nintendo Wii U
- Nintendo 3DS/2DS
- OpenBSD
- OpenDingux
- Original Microsoft Xbox
- PlayStation2
- PlayStation3
- PlayStation4
Expand All @@ -99,17 +99,17 @@ RetroArch has been ported to the following platforms:
- RS90
- SerenityOS
- Solaris
- Windows 10
- Windows 11
- Windows 2000
- Windows 7
- Windows 8
- Windows NT 3.5
- Windows 95
- Windows 98
- Windows 2000
- Windows XP
- Windows Millennium
- Windows NT 3.5
- Windows Vista
- Windows XP
- Windows 7
- Windows 8
- Windows 10
- Windows 11

## Dependencies (PC)

Expand Down
11 changes: 8 additions & 3 deletions audio/drivers/wasapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include "../../verbosity.h"
#include "../../configuration.h"

/* Max time to wait before continuing */
#define WASAPI_TIMEOUT 256

typedef struct
{
HANDLE write_event;
Expand Down Expand Up @@ -200,7 +203,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void *data, size_t size
if (!write_avail)
{
size_t read_avail = 0;
if (!(WaitForSingleObject(w->write_event, INFINITE) == WAIT_OBJECT_0))
if (!(WaitForSingleObject(w->write_event, WASAPI_TIMEOUT) == WAIT_OBJECT_0))
return -1;

if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding)))
Expand Down Expand Up @@ -228,7 +231,7 @@ static ssize_t wasapi_write_sh(wasapi_t *w, const void *data, size_t size)
size_t write_avail = 0;
UINT32 padding = 0;

if (!(WaitForSingleObject(w->write_event, INFINITE) == WAIT_OBJECT_0))
if (!(WaitForSingleObject(w->write_event, WASAPI_TIMEOUT) == WAIT_OBJECT_0))
return -1;

if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding)))
Expand Down Expand Up @@ -319,6 +322,8 @@ static ssize_t wasapi_write(void *wh, const void *data, size_t size)
ssize_t ir = 0;
wasapi_t *w = (wasapi_t*)wh;

if (!w->running) return -1;

if (w->nonblock)
{
if (w->exclusive)
Expand All @@ -330,7 +335,7 @@ static ssize_t wasapi_write(void *wh, const void *data, size_t size)
{
for (ir = -1; written < size; written += ir)
{
ir = wasapi_write_ex(w, (char*)data + written, size - written, INFINITE);
ir = wasapi_write_ex(w, (char*)data + written, size - written, WASAPI_TIMEOUT);
if (ir == -1)
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion com.libretro.RetroArch.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- Copyright 2019 Rob Loach <[email protected]> -->
<component type="desktop-application">
<id>com.libretro.RetroArch</id>
<launchable type="desktop-id">retroarch.desktop</launchable>
<launchable type="desktop-id">org.libretro.RetroArch.desktop</launchable>
<name>RetroArch</name>
<summary>Frontend for emulators, game engines and media players</summary>
<developer_name>libretro</developer_name>
Expand Down
5 changes: 5 additions & 0 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -2885,6 +2885,11 @@ void config_set_defaults(void *data)
settings->bools.accessibility_enable, RAIsVoiceOverRunning());
#endif

#ifdef ANDROID
configuration_set_bool(settings,
settings->bools.accessibility_enable, is_narrator_running(true));
#endif

#ifdef HAVE_MENU
if (first_initialized)
configuration_set_bool(settings,
Expand Down
3 changes: 3 additions & 0 deletions default.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.19.1
- Savestates: Revert savestate changes, was causing corruption and other issues

# 1.19.0
- AI: Revert AI translation to previous version (fix for translation not working with HW rendered cores)
- APPLE: Try to use system preferred language
Expand Down
35 changes: 33 additions & 2 deletions frontend/drivers/platform_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2092,6 +2092,10 @@ static void frontend_unix_init(void *data)
"getVolumePath", "(Ljava/lang/String;)Ljava/lang/String;");
GET_METHOD_ID(env, android_app->inputGrabMouse, class,
"inputGrabMouse", "(Z)V");
GET_METHOD_ID(env, android_app->isScreenReaderEnabled, class,
"isScreenReaderEnabled", "()Z");
GET_METHOD_ID(env, android_app->accessibilitySpeak, class,
"accessibilitySpeak", "(Ljava/lang/String;)V");

GET_OBJECT_CLASS(env, class, obj);
GET_METHOD_ID(env, android_app->getStringExtra, class,
Expand Down Expand Up @@ -2961,6 +2965,33 @@ static bool accessibility_speak_unix(int speed,
}
#endif

#ifdef ANDROID
static bool is_narrator_running_android(void)
{
JNIEnv *env = jni_thread_getenv();
jboolean jbool = JNI_FALSE;

if (env != NULL)
CALL_BOOLEAN_METHOD(env, jbool,
g_android->activity->clazz, g_android->isScreenReaderEnabled);

return jbool == JNI_TRUE;
}

static bool accessibility_speak_android(int speed,
const char* speak_text, int priority)
{
JNIEnv *env = jni_thread_getenv();

if (env != NULL)
CALL_VOID_METHOD_PARAM(env, g_android->activity->clazz,
g_android->accessibilitySpeak,
(*env)->NewStringUTF(env, speak_text));

return true;
}
#endif

frontend_ctx_driver_t frontend_ctx_unix = {
frontend_unix_get_env, /* get_env */
frontend_unix_init, /* init */
Expand Down Expand Up @@ -3018,8 +3049,8 @@ frontend_ctx_driver_t frontend_ctx_unix = {
is_narrator_running_unix, /* is_narrator_running */
accessibility_speak_unix, /* accessibility_speak */
#else
NULL, /* is_narrator_running */
NULL, /* accessibility_speak */
is_narrator_running_android, /* is_narrator_running */
accessibility_speak_android, /* accessibility_speak */
#endif
#ifdef FERAL_GAMEMODE
frontend_unix_set_gamemode,
Expand Down
3 changes: 3 additions & 0 deletions frontend/drivers/platform_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ struct android_app
jmethodID getVolumePath;
jmethodID inputGrabMouse;

jmethodID isScreenReaderEnabled;
jmethodID accessibilitySpeak;

struct
{
unsigned width, height;
Expand Down
5 changes: 2 additions & 3 deletions gfx/common/wayland_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

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

#define APP_ID "org.libretro.RetroArch"
#define WINDOW_TITLE "RetroArch"

#ifdef HAVE_LIBDECOR_H
Expand Down Expand Up @@ -727,7 +726,7 @@ bool gfx_ctx_wl_init_common(
goto error;
}

wl->libdecor_frame_set_app_id(wl->libdecor_frame, APP_ID);
wl->libdecor_frame_set_app_id(wl->libdecor_frame, WAYLAND_APP_ID);
wl->libdecor_frame_set_title(wl->libdecor_frame, WINDOW_TITLE);
wl->libdecor_frame_map(wl->libdecor_frame);

Expand All @@ -753,7 +752,7 @@ bool gfx_ctx_wl_init_common(
wl->xdg_toplevel = xdg_surface_get_toplevel(wl->xdg_surface);
xdg_toplevel_add_listener(wl->xdg_toplevel, &toplevel_listener->xdg_toplevel_listener, wl);

xdg_toplevel_set_app_id(wl->xdg_toplevel, APP_ID);
xdg_toplevel_set_app_id(wl->xdg_toplevel, WAYLAND_APP_ID);
xdg_toplevel_set_title(wl->xdg_toplevel, WINDOW_TITLE);

if (wl->deco_manager)
Expand Down
2 changes: 2 additions & 0 deletions gfx/common/wayland_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#define SPLASH_WINDOW_WIDTH 240
#define SPLASH_WINDOW_HEIGHT 256

#define WAYLAND_APP_ID "org.libretro.RetroArch"

typedef struct toplevel_listener
{
#ifdef HAVE_LIBDECOR_H
Expand Down
2 changes: 1 addition & 1 deletion input/common/wayland_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ typedef struct gfx_ctx_wayland_data
struct libdecor *libdecor_context;
struct libdecor_frame *libdecor_frame;
#ifdef HAVE_DYLIB
struct dylib_t *libdecor;
dylib_t libdecor;
#define RA_WAYLAND_SYM(rc,fn,params) rc (*fn) params;
#include "../../gfx/common/wayland/libdecor_sym.h"
#endif
Expand Down
8 changes: 4 additions & 4 deletions intl/msg_hash_be.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ MSG_HASH(

MSG_HASH(
MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST,
"Пампавальнік ядраў"
"Спампоўванне ядраў"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_UPDATE_INSTALLED_CORES,
Expand Down Expand Up @@ -355,15 +355,15 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT,
"Пампавальнік змесціва"
"Спампоўванне змесціва"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DOWNLOAD_CORE_CONTENT,
"Сцягвае вольнае змесціва для выбранага ядра."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_SYSTEM_FILES,
"Пампавальнік сістэмных файлаў ядраў"
"Спампоўванне сістэмных файлаў ядраў"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DOWNLOAD_CORE_SYSTEM_FILES,
Expand Down Expand Up @@ -4201,7 +4201,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Паказ 'Пампавальнік ядраў'"
"Паказ 'Спампоўванне ядраў'"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SHOW_LEGACY_THUMBNAIL_UPDATER,
Expand Down
18 changes: 15 additions & 3 deletions intl/msg_hash_chs.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE,
"禁用游戏机厅模式。(需要重启)"
"禁用游戏厅模式 (需要重启)"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE,
Expand Down Expand Up @@ -195,11 +195,11 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_RESTART_RETROARCH,
"重启"
"重新启动"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_RESTART_RETROARCH,
"重新启动RetroArch"
"重新启动RetroArch"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
Expand Down Expand Up @@ -2074,6 +2074,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SCAN_SUBFRAMES,
"在多个子帧上模拟基本的滚动扫描线,方法是垂直分割屏幕,并根据子帧的数量渲染屏幕的每个部分。"
)
MSG_HASH(
MENU_ENUM_LABEL_HELP_VIDEO_SCAN_SUBFRAMES,
"在多个子帧上模拟基本的滚动扫描线,方法是垂直分割屏幕,并根据从屏幕顶部向下的子帧数量渲染屏幕的每个部分。"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_GPU_SCREENSHOT,
"如果可以的话,截取 GPU 渲染材质的输出。"
Expand Down Expand Up @@ -6590,6 +6594,14 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"显示「收藏」选项。"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_PLAYLIST,
"显示‘添加到播放列表’"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_PLAYLIST,
"显示‘添加到播放列表’选项"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION,
"显示「设置核心关联」"
Expand Down
Loading

0 comments on commit ce2a9ad

Please sign in to comment.