mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
7021a4909e
28
CHANGES.md
28
CHANGES.md
@ -1,10 +1,33 @@
|
||||
# Future (1.7.9) [v3]
|
||||
# Future
|
||||
- BUGFIX/MENU: Fix menu rendering with Mali GPUs after changing video dimensions
|
||||
- CDROM: Adds pregap support to cdfs helper methods
|
||||
- CHEEVOS: Provides the new PCEngine hashing algorithm for RetroAchievements
|
||||
- LOCALIZATION: Update French translation
|
||||
- LOCALIZATION: Update Polish translation
|
||||
- MENU/MATERIALUI: Bugfix - Under certain extreme circumstances, entries with very long sublabel strings could have their text prematurely 'clipped' as the entry is scrolled beyond the top of the screen
|
||||
- MENU/MATERIALUI: Bugfix - Certain setting value strings were unnecessarily truncated (with a ...) when using smooth ticker text
|
||||
|
||||
|
||||
# (1.8.0)
|
||||
- AI SERVICE: Added in fix for BMP returns to AI service. Added in label passing to AI service call
|
||||
- BSV: Fix BSV recording/playback
|
||||
- BUGFIX: Fix crash when setting Thumbnail Directory
|
||||
- BUGFIX/STABILITY: Set "Automatically Add Content to Playlist" to false by default, this was unstable on PS3 and Mac and other platforms potentially as well.
|
||||
- COMMON: Graceful driver switching for Windows and Linux
|
||||
- COMMON: Cache frame before converting 0RGB1555
|
||||
- LAKKA: Wi-Fi Access Point settings
|
||||
- MENU: Menu scaling improvements
|
||||
- MENU/MATERIALUI: There are no longer any animation glitches when 'wraparound' scrolling from the last entry in a list to the first, or when performing horizontal swipe navigation gestures on certain settings-type entries
|
||||
- MENU/MATERIALUI: List entries underneath the title and navigation bars are no longer highlighted when touching the title/navigation bars (this was only a cosmetic issue, but it was annoying...)
|
||||
- MENU/MATERIALUI: The current menu list is no longer reloaded when pressing the currently active tab on the navigation bar
|
||||
- MENU/MATERIALUI: The ticker text spacer has been set to a 'bullet' character (same as Ozone)
|
||||
- MENU/MATERIALUI: The default colour theme has been set to 'Ozone Dark'
|
||||
- MENU/MATERIALUI: Three new colour themes have been added.
|
||||
- MENU/MATERIALUI: A new Menu Transition Animation option has been added under User Interface > Appearance. When this is enabled, menu transition events are animated
|
||||
- MENU/MATERIALUI: The navigation bar is now shown at all times - i.e. it is an actual navigation tool, rather than a 'top-level-menu' curiosity
|
||||
- MENU/MATERIALUI: Two new context-sensitive buttons have been added to the navigation bar - back button and resume button
|
||||
- MENU/MATERIALUI: A new Auto-Rotate Navigation Bar option has been added under User Interface > Appearance. When enabled (this is the default setting), the navigation bar is moved to the right hand side of the screen when using landscape screen orientations.
|
||||
- MENU/MATERIALUI: The playlists tab is now correctly hidden when User Interface > Views > Show Playlist Tabs is disabled
|
||||
- MENU/MATERIALUI: Material UI now correctly readjusts its layout when screen orientation changes on mobile devices
|
||||
- MENU/MATERIALUI: Material UI now resizes in real-time when the user manually sets the Menu Scale Factor (this never worked properly with the old DPI override)
|
||||
- MENU/MATERIALUI: Material UI no longer leaks memory on 'context reset' (fonts were previously never free()'d)
|
||||
@ -16,7 +39,7 @@
|
||||
- OSD: Fix fast forward indicator when not using menu widgets
|
||||
- PSP1: Remove duplicated FPS indicator on the screen
|
||||
- SWITCH: Make audren threaded audio driver the new default
|
||||
- VIDEO LAYOUT: Add video layout mame overlay compatibility. Enabled for Windows/Linux/OSX/iOS/Android/libnx. Only works with GL driver for now
|
||||
- VIDEO LAYOUT: Add video layout mame overlay compatibility. Enabled for Windows/Linux/OSX/iOS/Android/libnx. Only works with GL driver for now, no glcore yet
|
||||
|
||||
# (1.7.9) (v2)
|
||||
- 3DS: Fix 3DS screen flickering when OSD is enabled
|
||||
@ -962,3 +985,4 @@ Skipped this one
|
||||
|
||||
# 1.4.1
|
||||
|
||||
|
||||
|
@ -1127,6 +1127,7 @@ typedef struct
|
||||
struct http_connection_t *conn;
|
||||
struct http_t *http;
|
||||
const rcheevos_cheevo_t *cheevo_end;
|
||||
cdfs_track_t *track;
|
||||
cdfs_file_t cdfp;
|
||||
|
||||
/* co-routine required fields */
|
||||
@ -1151,7 +1152,8 @@ enum
|
||||
RCHEEVOS_HTTP_GET = -13,
|
||||
RCHEEVOS_DEACTIVATE = -14,
|
||||
RCHEEVOS_PLAYING = -15,
|
||||
RCHEEVOS_DELAY = -16
|
||||
RCHEEVOS_DELAY = -16,
|
||||
RCHEEVOS_PCE_CD_MD5 = -17
|
||||
};
|
||||
|
||||
static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
@ -1212,6 +1214,13 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
0
|
||||
};
|
||||
|
||||
static const uint32_t pce_cd_exts[] =
|
||||
{
|
||||
0x0b886782U, /* cue */
|
||||
0x0b8865d4U, /* chd */
|
||||
0
|
||||
};
|
||||
|
||||
static const uint32_t arcade_exts[] =
|
||||
{
|
||||
0x0b88c7d8U, /* zip */
|
||||
@ -1224,6 +1233,7 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
{RCHEEVOS_LYNX_MD5, "Atari Lynx (discards header)", lynx_exts},
|
||||
{RCHEEVOS_NES_MD5, "NES (discards header)", nes_exts},
|
||||
{RCHEEVOS_PSX_MD5, "Playstation (main executable)", psx_exts},
|
||||
{RCHEEVOS_PCE_CD_MD5, "PC Engine CD (boot sector)", pce_cd_exts},
|
||||
{RCHEEVOS_SEGACD_MD5, "Sega CD/Saturn (first sector)", segacd_exts},
|
||||
{RCHEEVOS_ARCADE_MD5, "Arcade (filename)", arcade_exts},
|
||||
{RCHEEVOS_GENERIC_MD5, "Generic (plain content)", NULL}
|
||||
@ -1584,11 +1594,11 @@ found:
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
/* find the data track - it should be the first one */
|
||||
coro->stream = cdfs_open_data_track(coro->path);
|
||||
if (coro->stream)
|
||||
coro->track = cdfs_open_data_track(coro->path);
|
||||
if (coro->track)
|
||||
{
|
||||
/* open the raw CD */
|
||||
if (cdfs_open_file(&coro->cdfp, coro->stream, NULL))
|
||||
if (cdfs_open_file(&coro->cdfp, coro->track, NULL))
|
||||
{
|
||||
coro->count = 512;
|
||||
free(coro->data);
|
||||
@ -1601,14 +1611,87 @@ found:
|
||||
|
||||
cdfs_close_file(&coro->cdfp);
|
||||
|
||||
intfstream_close(coro->stream);
|
||||
CHEEVOS_FREE(coro->stream);
|
||||
cdfs_close_track(coro->track);
|
||||
coro->track = NULL;
|
||||
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
}
|
||||
|
||||
intfstream_close(coro->stream);
|
||||
CHEEVOS_FREE(coro->stream);
|
||||
cdfs_close_track(coro->track);
|
||||
coro->track = NULL;
|
||||
}
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "could not open CD\n", coro->gameid);
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a PC Engine CD game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_PCE_CD_MD5)
|
||||
{
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
/* find the data track - it should be the second one */
|
||||
coro->track = cdfs_open_data_track(coro->path);
|
||||
if (coro->track)
|
||||
{
|
||||
/* open the raw CD */
|
||||
if (cdfs_open_file(&coro->cdfp, coro->track, NULL))
|
||||
{
|
||||
/* the PC-Engine uses the second sector to specify boot information and program name.
|
||||
* the string "PC Engine CD-ROM SYSTEM" should exist at 32 bytes into the sector
|
||||
* http://shu.sheldows.com/shu/download/pcedocs/pce_cdrom.html
|
||||
*/
|
||||
cdfs_seek_sector(&coro->cdfp, 1);
|
||||
cdfs_read_file(&coro->cdfp, buffer, 128);
|
||||
|
||||
if (strncmp("PC Engine CD-ROM SYSTEM", (const char*)& buffer[32], 23) != 0)
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "not a PC Engine CD\n", coro->gameid);
|
||||
|
||||
cdfs_close_track(coro->track);
|
||||
coro->track = NULL;
|
||||
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
{
|
||||
/* the first three bytes specify the sector of the program data, and the fourth byte
|
||||
* is the number of sectors.
|
||||
*/
|
||||
const unsigned int first_sector = buffer[0] * 65536 + buffer[1] * 256 + buffer[2];
|
||||
cdfs_seek_sector(&coro->cdfp, first_sector);
|
||||
|
||||
to_read = buffer[3] * 2048;
|
||||
}
|
||||
|
||||
coro->count = to_read + 22;
|
||||
free(coro->data);
|
||||
coro->data = (uint8_t*)malloc(coro->count);
|
||||
memcpy(coro->data, &buffer[106], 22);
|
||||
|
||||
cdfs_read_file(&coro->cdfp, ((uint8_t*)coro->data) + 22, to_read);
|
||||
coro->len = coro->count;
|
||||
|
||||
CORO_GOSUB(RCHEEVOS_EVAL_MD5);
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
|
||||
cdfs_close_file(&coro->cdfp);
|
||||
|
||||
cdfs_close_track(coro->track);
|
||||
coro->track = NULL;
|
||||
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
}
|
||||
|
||||
cdfs_close_track(coro->track);
|
||||
coro->track = NULL;
|
||||
}
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "could not open CD\n", coro->gameid);
|
||||
@ -1626,41 +1709,12 @@ found:
|
||||
{
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
/* if we're looking at an m3u file, get the first disc from the playlist */
|
||||
end = path_get_extension(coro->path);
|
||||
if (string_is_equal_noncase(end, "m3u"))
|
||||
{
|
||||
intfstream_t* m3u_stream = intfstream_open_file(coro->path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
if (m3u_stream)
|
||||
{
|
||||
char disc_path[PATH_MAX_LENGTH];
|
||||
char* tmp;
|
||||
|
||||
num_read = intfstream_read(m3u_stream, buffer, sizeof(buffer));
|
||||
intfstream_close(m3u_stream);
|
||||
buffer[num_read] = '\0';
|
||||
|
||||
tmp = buffer;
|
||||
while (*tmp && *tmp != '\n')
|
||||
++tmp;
|
||||
if (tmp > buffer && tmp[-1] == '\r')
|
||||
--tmp;
|
||||
*tmp = '\0';
|
||||
|
||||
fill_pathname_basedir(disc_path, coro->path, sizeof(disc_path));
|
||||
strlcat(disc_path, buffer, sizeof(disc_path));
|
||||
|
||||
free((void*)coro->path);
|
||||
coro->path = strdup(disc_path);
|
||||
}
|
||||
}
|
||||
|
||||
/* find the data track - it should be the first one */
|
||||
coro->stream = cdfs_open_data_track(coro->path);
|
||||
if (coro->stream)
|
||||
coro->track = cdfs_open_data_track(coro->path);
|
||||
if (coro->track)
|
||||
{
|
||||
/* open the SYSTEM.CNF file and find the BOOT= record */
|
||||
if (cdfs_open_file(&coro->cdfp, coro->stream, "SYSTEM.CNF"))
|
||||
if (cdfs_open_file(&coro->cdfp, coro->track, "SYSTEM.CNF"))
|
||||
{
|
||||
cdfs_read_file(&coro->cdfp, buffer, sizeof(buffer));
|
||||
|
||||
@ -1703,7 +1757,7 @@ found:
|
||||
strcpy(exe_name_buffer, exe_name);
|
||||
|
||||
/* open the file pointed to by the BOOT= record */
|
||||
if (exe_name_buffer[0] && cdfs_open_file(&coro->cdfp, coro->stream, exe_name_buffer))
|
||||
if (exe_name_buffer[0] && cdfs_open_file(&coro->cdfp, coro->track, exe_name_buffer))
|
||||
{
|
||||
cdfs_read_file(&coro->cdfp, buffer, sizeof(buffer));
|
||||
|
||||
@ -1750,8 +1804,8 @@ found:
|
||||
|
||||
cdfs_close_file(&coro->cdfp);
|
||||
|
||||
intfstream_close(coro->stream);
|
||||
CHEEVOS_FREE(coro->stream);
|
||||
cdfs_close_track(coro->track);
|
||||
coro->track = NULL;
|
||||
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
}
|
||||
@ -1761,8 +1815,8 @@ found:
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "could not locate primary executable\n", coro->gameid);
|
||||
|
||||
intfstream_close(coro->stream);
|
||||
CHEEVOS_FREE(coro->stream);
|
||||
cdfs_close_track(coro->track);
|
||||
coro->track = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2331,6 +2385,7 @@ bool rcheevos_load(const void *data)
|
||||
CORO_SETUP();
|
||||
|
||||
info = (const struct retro_game_info*)data;
|
||||
strncpy(buffer, path_get_extension(info->path), sizeof(buffer));
|
||||
|
||||
if (info->data)
|
||||
{
|
||||
@ -2356,9 +2411,40 @@ bool rcheevos_load(const void *data)
|
||||
{
|
||||
coro->data = NULL;
|
||||
coro->path = strdup(info->path);
|
||||
|
||||
/* if we're looking at an m3u file, get the first disc from the playlist */
|
||||
if (string_is_equal_noncase(path_get_extension(coro->path), "m3u"))
|
||||
{
|
||||
intfstream_t* m3u_stream = intfstream_open_file(coro->path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
if (m3u_stream)
|
||||
{
|
||||
char m3u_contents[1024];
|
||||
char disc_path[PATH_MAX_LENGTH];
|
||||
char* tmp;
|
||||
int64_t num_read;
|
||||
|
||||
num_read = intfstream_read(m3u_stream, m3u_contents, sizeof(m3u_contents) - 1);
|
||||
intfstream_close(m3u_stream);
|
||||
m3u_contents[num_read] = '\0';
|
||||
|
||||
tmp = m3u_contents;
|
||||
while (*tmp && *tmp != '\n')
|
||||
++tmp;
|
||||
if (tmp > buffer && tmp[-1] == '\r')
|
||||
--tmp;
|
||||
*tmp = '\0';
|
||||
|
||||
fill_pathname_basedir(disc_path, coro->path, sizeof(disc_path));
|
||||
strlcat(disc_path, m3u_contents, sizeof(disc_path));
|
||||
|
||||
free((void*)coro->path);
|
||||
coro->path = strdup(disc_path);
|
||||
|
||||
strncpy(buffer, path_get_extension(disc_path), sizeof(buffer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
strncpy(buffer, path_get_extension(info->path), sizeof(buffer));
|
||||
buffer[sizeof(buffer) - 1] = '\0';
|
||||
string_to_lower(buffer);
|
||||
coro->ext_hash = rcheevos_djb2(buffer, strlen(buffer));
|
||||
|
31
config.def.h
31
config.def.h
@ -114,9 +114,33 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MATERIALUI
|
||||
/* Show icons to the left of each menu entry */
|
||||
#define DEFAULT_MATERIALUI_ICONS_ENABLE true
|
||||
#endif
|
||||
|
||||
/* Material UI colour theme */
|
||||
#define DEFAULT_MATERIALUI_THEME MATERIALUI_THEME_OZONE_DARK
|
||||
|
||||
/* Type of animation to use when performing menu transitions
|
||||
* > 'Auto' follows Material UI standards:
|
||||
* - Slide when switching between parent menus (tabs)
|
||||
* - Fade when changing levels in a menu
|
||||
* Note: Not wrapping this with a HAVE_MATERIALUI ifdef
|
||||
* because there's too much baggage involved... */
|
||||
#define DEFAULT_MATERIALUI_TRANSITION_ANIM MATERIALUI_TRANSITION_ANIM_AUTO
|
||||
|
||||
/* Adjust menu padding etc. to better fit the
|
||||
* screen when using landscape layouts */
|
||||
#if defined(RARCH_MOBILE)
|
||||
#define DEFAULT_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT false
|
||||
#else
|
||||
#define DEFAULT_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT true
|
||||
#endif
|
||||
|
||||
/* Reposition navigation bar to make better use
|
||||
* of screen space when using landscape layouts */
|
||||
#define DEFAULT_MATERIALUI_AUTO_ROTATE_NAV_BAR true
|
||||
|
||||
#define DEFAULT_CRT_SWITCH_RESOLUTION CRT_SWITCH_NONE
|
||||
|
||||
#define DEFAULT_CRT_SWITCH_RESOLUTION_SUPER 2560
|
||||
@ -127,6 +151,8 @@
|
||||
|
||||
#define DEFAULT_PLAYLIST_ENTRY_RENAME true
|
||||
|
||||
#define DEFAULT_DRIVER_SWITCH_ENABLE true
|
||||
|
||||
#define DEFAULT_USER_LANGUAGE 0
|
||||
|
||||
#if (defined(_WIN32) && !defined(_XBOX)) || (defined(__linux) && !defined(ANDROID) && !defined(HAVE_LAKKA)) || (defined(__MACH__) && !defined(IOS)) || defined(EMSCRIPTEN)
|
||||
@ -520,7 +546,8 @@ static bool rgui_extended_ascii = false;
|
||||
#define DEFAULT_BLOCK_CONFIG_READ false
|
||||
#endif
|
||||
|
||||
#define DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST true
|
||||
/* TODO/FIXME - this setting is thread-unsafe right now and can corrupt the stack - default to off */
|
||||
#define DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST false
|
||||
|
||||
static bool default_game_specific_options = true;
|
||||
static bool default_auto_overrides_enable = true;
|
||||
@ -1118,6 +1145,8 @@ static char default_discord_app_id[] = "475456035851599874";
|
||||
|
||||
#define DEFAULT_AI_SERVICE_ENABLE true
|
||||
|
||||
#define DEFAULT_AI_SERVICE_PAUSE false
|
||||
|
||||
#define DEFAULT_AI_SERVICE_MODE 1
|
||||
|
||||
#define DEFAULT_AI_SERVICE_URL "http://localhost:4404/"
|
||||
|
@ -1330,6 +1330,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
struct config_bool_setting *tmp = (struct config_bool_setting*)calloc(1, (*size + 1) * sizeof(struct config_bool_setting));
|
||||
unsigned count = 0;
|
||||
|
||||
SETTING_BOOL("driver_switch_enable", &settings->bools.driver_switch_enable, true, DEFAULT_DRIVER_SWITCH_ENABLE, false);
|
||||
SETTING_BOOL("frame_time_counter_reset_after_fastforwarding", &settings->bools.frame_time_counter_reset_after_fastforwarding, true, false, false);
|
||||
SETTING_BOOL("frame_time_counter_reset_after_load_state", &settings->bools.frame_time_counter_reset_after_load_state, true, false, false);
|
||||
SETTING_BOOL("frame_time_counter_reset_after_save_state", &settings->bools.frame_time_counter_reset_after_save_state, true, false, false);
|
||||
@ -1555,6 +1556,8 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("menu_show_advanced_settings", &settings->bools.menu_show_advanced_settings, true, DEFAULT_SHOW_ADVANCED_SETTINGS, false);
|
||||
#ifdef HAVE_MATERIALUI
|
||||
SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, DEFAULT_MATERIALUI_ICONS_ENABLE, false);
|
||||
SETTING_BOOL("materialui_optimize_landscape_layout", &settings->bools.menu_materialui_optimize_landscape_layout, true, DEFAULT_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT, false);
|
||||
SETTING_BOOL("materialui_auto_rotate_nav_bar", &settings->bools.menu_materialui_auto_rotate_nav_bar, true, DEFAULT_MATERIALUI_AUTO_ROTATE_NAV_BAR, false);
|
||||
#endif
|
||||
#ifdef HAVE_RGUI
|
||||
SETTING_BOOL("rgui_background_filler_thickness_enable", &settings->bools.menu_rgui_background_filler_thickness_enable, true, true, false);
|
||||
@ -1662,6 +1665,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_LOG_TO_FILE);
|
||||
SETTING_BOOL("log_to_file_timestamp", &settings->bools.log_to_file_timestamp, true, DEFAULT_LOG_TO_FILE_TIMESTAMP, false);
|
||||
SETTING_BOOL("ai_service_enable", &settings->bools.ai_service_enable, DEFAULT_AI_SERVICE_ENABLE, false, false);
|
||||
SETTING_BOOL("ai_service_pause", &settings->bools.ai_service_pause, true, DEFAULT_AI_SERVICE_PAUSE, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
@ -1806,7 +1810,8 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("menu_font_color_blue", &settings->uints.menu_font_color_blue, true, menu_font_color_blue, false);
|
||||
SETTING_UINT("menu_xmb_thumbnail_scale_factor", &settings->uints.menu_xmb_thumbnail_scale_factor, true, xmb_thumbnail_scale_factor, false);
|
||||
#endif
|
||||
SETTING_UINT("materialui_menu_color_theme", &settings->uints.menu_materialui_color_theme, true, MATERIALUI_THEME_BLUE, false);
|
||||
SETTING_UINT("materialui_menu_color_theme", &settings->uints.menu_materialui_color_theme, true, DEFAULT_MATERIALUI_THEME, false);
|
||||
SETTING_UINT("materialui_menu_transition_animation", &settings->uints.menu_materialui_transition_animation, true, DEFAULT_MATERIALUI_TRANSITION_ANIM, false);
|
||||
SETTING_UINT("menu_shader_pipeline", &settings->uints.menu_xmb_shader_pipeline, true, DEFAULT_MENU_SHADER_PIPELINE, false);
|
||||
#ifdef HAVE_OZONE
|
||||
SETTING_UINT("ozone_menu_color_theme", &settings->uints.menu_ozone_color_theme, true, 1, false);
|
||||
|
@ -186,6 +186,8 @@ typedef struct settings
|
||||
bool menu_show_video_layout;
|
||||
#endif
|
||||
bool menu_materialui_icons_enable;
|
||||
bool menu_materialui_optimize_landscape_layout;
|
||||
bool menu_materialui_auto_rotate_nav_bar;
|
||||
bool menu_rgui_background_filler_thickness_enable;
|
||||
bool menu_rgui_border_filler_thickness_enable;
|
||||
bool menu_rgui_border_filler_enable;
|
||||
@ -303,6 +305,9 @@ typedef struct settings
|
||||
bool bundle_finished;
|
||||
bool bundle_assets_extract_enable;
|
||||
|
||||
/* Driver */
|
||||
bool driver_switch_enable;
|
||||
|
||||
/* Misc. */
|
||||
bool discord_enable;
|
||||
bool threaded_data_runloop_enable;
|
||||
@ -377,6 +382,7 @@ typedef struct settings
|
||||
bool scan_without_core_match;
|
||||
|
||||
bool ai_service_enable;
|
||||
bool ai_service_pause;
|
||||
} bools;
|
||||
|
||||
struct
|
||||
@ -528,6 +534,7 @@ typedef struct settings
|
||||
unsigned menu_xmb_color_theme;
|
||||
unsigned menu_xmb_thumbnail_scale_factor;
|
||||
unsigned menu_materialui_color_theme;
|
||||
unsigned menu_materialui_transition_animation;
|
||||
unsigned menu_ozone_color_theme;
|
||||
unsigned menu_font_color_red;
|
||||
unsigned menu_font_color_green;
|
||||
|
@ -1,684 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#include <xgraphics.h>
|
||||
#endif
|
||||
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../common/d3d_common.h"
|
||||
#include "../common/d3d9_common.h"
|
||||
#include "../font_driver.h"
|
||||
|
||||
#include "../drivers/d3d_shaders/font.hlsl.d3d9.h"
|
||||
|
||||
#define XPR0_MAGIC_VALUE 0x30525058
|
||||
#define XPR1_MAGIC_VALUE 0x31525058
|
||||
#define XPR2_MAGIC_VALUE 0x58505232
|
||||
|
||||
#define FONT_SCALE(d3d) ((d3d->resolution_hd_enable) ? 2 : 1)
|
||||
#define CALCFONTFILEHEADERSIZE(x) ( sizeof(uint32_t) + (sizeof(float)* 4) + sizeof(uint16_t) + (sizeof(wchar_t)*(x)) )
|
||||
#define FONTFILEVERSION 5
|
||||
|
||||
#ifdef _XBOX360
|
||||
struct XPR_HEADER
|
||||
{
|
||||
DWORD dwMagic;
|
||||
DWORD dwHeaderSize;
|
||||
DWORD dwDataSize;
|
||||
};
|
||||
#endif
|
||||
|
||||
/* structure member offsets matter */
|
||||
struct XBRESOURCE
|
||||
{
|
||||
DWORD dwType;
|
||||
DWORD dwOffset;
|
||||
DWORD dwSize;
|
||||
char *strName;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
RESOURCETYPE_USERDATA = ( ( 'U' << 24 ) | ( 'S' << 16 ) | ( 'E' << 8 ) | ( 'R' ) ),
|
||||
RESOURCETYPE_TEXTURE = ( ( 'T' << 24 ) | ( 'X' << 16 ) | ( '2' << 8 ) | ( 'D' ) ),
|
||||
RESOURCETYPE_VERTEXBUFFER = ( ( 'V' << 24 ) | ( 'B' << 16 ) | ( 'U' << 8 ) | ( 'F' ) ),
|
||||
RESOURCETYPE_INDEXBUFFER = ( ( 'I' << 24 ) | ( 'B' << 16 ) | ( 'U' << 8 ) | ( 'F' ) ),
|
||||
RESOURCETYPE_EOF = 0xffffffff
|
||||
};
|
||||
|
||||
class PackedResource
|
||||
{
|
||||
protected:
|
||||
BYTE* m_pSysMemData; /* Allocated memory for resource headers etc. */
|
||||
DWORD m_dwSysMemDataSize;
|
||||
|
||||
BYTE* m_pVidMemData; /* Allocated memory for resource data, etc. */
|
||||
DWORD m_dwVidMemDataSize;
|
||||
|
||||
XBRESOURCE* m_pResourceTags; /* Tags to associate names with the resources */
|
||||
DWORD m_dwNumResourceTags; /* Number of resource tags */
|
||||
|
||||
public:
|
||||
/* Loads the resources out of the specified bundle */
|
||||
HRESULT Create(const char *strFilename, DWORD dwNumResourceTags,
|
||||
void *pResourceTags);
|
||||
|
||||
void Destroy();
|
||||
|
||||
BOOL m_bInitialized; /* Resource is fully initialized */
|
||||
|
||||
/* Functions to retrieve resources by their name */
|
||||
void *GetData( const char* strName );
|
||||
LPDIRECT3DTEXTURE9 *GetTexture(const char* strName);
|
||||
|
||||
/* Constructor/destructor */
|
||||
PackedResource();
|
||||
~PackedResource();
|
||||
};
|
||||
|
||||
LPDIRECT3DTEXTURE9 *PackedResource::GetTexture(const char* strName)
|
||||
{
|
||||
LPDIRECT3DRESOURCE9 pResource = (LPDIRECT3DRESOURCE9)GetData(strName);
|
||||
return (LPDIRECT3DTEXTURE9*)pResource;
|
||||
}
|
||||
|
||||
PackedResource::PackedResource()
|
||||
{
|
||||
m_pSysMemData = NULL;
|
||||
m_pVidMemData = NULL;
|
||||
m_pResourceTags = NULL;
|
||||
m_dwSysMemDataSize = 0L;
|
||||
m_dwVidMemDataSize = 0L;
|
||||
m_dwNumResourceTags = 0L;
|
||||
m_bInitialized = false;
|
||||
}
|
||||
|
||||
PackedResource::~PackedResource()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void *PackedResource::GetData(const char *strName)
|
||||
{
|
||||
if (!m_pResourceTags || !strName)
|
||||
return NULL;
|
||||
|
||||
for (DWORD i = 0; i < m_dwNumResourceTags; i++)
|
||||
{
|
||||
if (string_is_equal_noncase(strName, m_pResourceTags[i].strName))
|
||||
return &m_pSysMemData[m_pResourceTags[i].dwOffset];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static INLINE void* AllocateContiguousMemory(DWORD Size, DWORD Alignment)
|
||||
{
|
||||
return XMemAlloc(Size, MAKE_XALLOC_ATTRIBUTES(0, 0, 0, 0, eXALLOCAllocatorId_GameMax,
|
||||
Alignment, XALLOC_MEMPROTECT_WRITECOMBINE, 0, XALLOC_MEMTYPE_PHYSICAL));
|
||||
}
|
||||
|
||||
static INLINE void FreeContiguousMemory(void* pData)
|
||||
{
|
||||
return XMemFree(pData, MAKE_XALLOC_ATTRIBUTES(0, 0, 0, 0, eXALLOCAllocatorId_GameMax,
|
||||
0, 0, 0, XALLOC_MEMTYPE_PHYSICAL));
|
||||
}
|
||||
|
||||
HRESULT PackedResource::Create(const char *strFilename,
|
||||
DWORD dwNumResourceTags, void* pResourceTags)
|
||||
{
|
||||
unsigned i;
|
||||
DWORD dwNumBytesRead;
|
||||
XPR_HEADER xprh;
|
||||
HANDLE hFile = CreateFile(strFilename, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
return E_FAIL;
|
||||
|
||||
if (!ReadFile(hFile, &xprh, sizeof(XPR_HEADER), &dwNumBytesRead, NULL) ||
|
||||
xprh.dwMagic != XPR2_MAGIC_VALUE)
|
||||
{
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Compute memory requirements */
|
||||
m_dwSysMemDataSize = xprh.dwHeaderSize;
|
||||
m_dwVidMemDataSize = xprh.dwDataSize;
|
||||
|
||||
/* Allocate memory */
|
||||
m_pSysMemData = (BYTE*)malloc(m_dwSysMemDataSize);
|
||||
|
||||
if (!m_pSysMemData)
|
||||
{
|
||||
m_dwSysMemDataSize = 0;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pVidMemData = (BYTE*)AllocateContiguousMemory(m_dwVidMemDataSize,
|
||||
XALLOC_PHYSICAL_ALIGNMENT_4K
|
||||
);
|
||||
|
||||
if(!m_pVidMemData)
|
||||
{
|
||||
m_dwSysMemDataSize = 0;
|
||||
m_dwVidMemDataSize = 0;
|
||||
free(m_pSysMemData);
|
||||
m_pSysMemData = NULL;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Read in the data from the file */
|
||||
if( !ReadFile( hFile, m_pSysMemData, m_dwSysMemDataSize, &dwNumBytesRead, NULL) ||
|
||||
!ReadFile( hFile, m_pVidMemData, m_dwVidMemDataSize, &dwNumBytesRead, NULL))
|
||||
{
|
||||
CloseHandle( hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Done with the file */
|
||||
CloseHandle( hFile);
|
||||
|
||||
/* Extract resource table from the header data */
|
||||
m_dwNumResourceTags = *(DWORD*)(m_pSysMemData + 0);
|
||||
m_pResourceTags = (XBRESOURCE*)(m_pSysMemData + 4);
|
||||
|
||||
/* Patch up the resources */
|
||||
|
||||
for(i = 0; i < m_dwNumResourceTags; i++)
|
||||
{
|
||||
m_pResourceTags[i].strName = (char*)(m_pSysMemData + (DWORD)m_pResourceTags[i].strName);
|
||||
if((m_pResourceTags[i].dwType & 0xffff0000) == (RESOURCETYPE_TEXTURE & 0xffff0000))
|
||||
{
|
||||
D3DTexture *pTexture = (D3DTexture*)&m_pSysMemData[m_pResourceTags[i].dwOffset];
|
||||
XGOffsetBaseTextureAddress(pTexture, m_pVidMemData, m_pVidMemData);
|
||||
}
|
||||
}
|
||||
|
||||
m_bInitialized = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void PackedResource::Destroy()
|
||||
{
|
||||
free(m_pSysMemData);
|
||||
|
||||
if (m_pVidMemData != NULL)
|
||||
FreeContiguousMemory(m_pVidMemData);
|
||||
|
||||
m_pSysMemData = NULL;
|
||||
m_pVidMemData = NULL;
|
||||
m_pResourceTags = NULL;
|
||||
m_dwSysMemDataSize = 0L;
|
||||
m_dwVidMemDataSize = 0L;
|
||||
m_dwNumResourceTags = 0L;
|
||||
|
||||
m_bInitialized = false;
|
||||
}
|
||||
|
||||
typedef struct GLYPH_ATTR
|
||||
{
|
||||
uint16_t tu1, tv1, tu2, tv2; /* Texture coordinates for the image. */
|
||||
int16_t wOffset; /* Pixel offset for glyph start. */
|
||||
int16_t wWidth; /* Pixel width of the glyph. */
|
||||
int16_t wAdvance; /* Pixels to advance after the glyph. */
|
||||
uint16_t wMask;
|
||||
} GLYPH_ATTR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
D3DVertexDeclaration *m_pFontVertexDecl;
|
||||
D3DVertexShader *m_pFontVertexShader;
|
||||
D3DPixelShader *m_pFontPixelShader;
|
||||
} Font_Locals_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Font_Locals_t s_FontLocals;
|
||||
d3d9_video_t *d3d;
|
||||
uint32_t m_dwSavedState;
|
||||
uint32_t m_cMaxGlyph; /* Number of entries in the translator table. */
|
||||
uint32_t m_dwNumGlyphs; /* Number of valid glyphs. */
|
||||
float m_fFontHeight; /* Height of the font strike in pixels. */
|
||||
float m_fFontTopPadding; /* Padding above the strike zone. */
|
||||
float m_fFontBottomPadding; /* Padding below the strike zone. */
|
||||
float m_fFontYAdvance; /* Number of pixels to move the cursor for a line feed. */
|
||||
wchar_t * m_TranslatorTable; /* ASCII to glyph lookup table. */
|
||||
LPDIRECT3DTEXTURE9 m_pFontTexture;
|
||||
const GLYPH_ATTR* m_Glyphs; /* Array of glyphs. */
|
||||
} xdk360_video_font_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t m_dwFileVersion; /* Version of the font file (Must match FONTFILEVERSION). */
|
||||
float m_fFontHeight; /* Height of the font strike in pixels. */
|
||||
float m_fFontTopPadding; /* Padding above the strike zone. */
|
||||
float m_fFontBottomPadding; /* Padding below the strike zone. */
|
||||
float m_fFontYAdvance; /* Number of pixels to move the cursor for a line feed. */
|
||||
uint16_t m_cMaxGlyph; /* Number of font characters (Should be an odd number to maintain DWORD Alignment). */
|
||||
wchar_t m_TranslatorTable[1]; /* ASCII to Glyph lookup table, NOTE: It's m_cMaxGlyph+1 in size. */
|
||||
} FontFileHeaderImage_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t m_dwNumGlyphs; /* Size of font strike array (First entry is the unknown glyph). */
|
||||
GLYPH_ATTR m_Glyphs[1]; /* Array of font strike uv's etc... NOTE: It's m_dwNumGlyphs in size. */
|
||||
} FontFileStrikesImage_t;
|
||||
|
||||
static PackedResource m_xprResource;
|
||||
|
||||
static bool xdk360_video_font_create_shaders(xdk360_video_font_t * font, LPDIRECT3DDEVICE9 dev)
|
||||
{
|
||||
ID3DXBuffer* pShaderCode = NULL;
|
||||
|
||||
static const D3DVERTEXELEMENT9 decl[] =
|
||||
{
|
||||
{ 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 },
|
||||
{ 0, 8, D3DDECLTYPE_USHORT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 },
|
||||
{ 0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1 },
|
||||
D3DDECL_END()
|
||||
};
|
||||
|
||||
if (font->s_FontLocals.m_pFontVertexDecl)
|
||||
{
|
||||
font->s_FontLocals.m_pFontVertexDecl->AddRef();
|
||||
font->s_FontLocals.m_pFontVertexShader->AddRef();
|
||||
font->s_FontLocals.m_pFontPixelShader->AddRef();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!d3d9_vertex_declaration_new(dev, decl, (void**)&font->s_FontLocals.m_pFontVertexDecl))
|
||||
goto error;
|
||||
|
||||
if (!d3d9x_compile_shader( font_hlsl_d3d9_program, sizeof(font_hlsl_d3d9_program)-1 ,
|
||||
NULL, NULL, "main_vertex", "vs.2.0", 0, &pShaderCode, NULL, NULL ))
|
||||
goto error;
|
||||
|
||||
if (!d3d9_create_vertex_shader(dev, (const DWORD*)pShaderCode->GetBufferPointer(),
|
||||
(void**)&font->s_FontLocals.m_pFontVertexShader ))
|
||||
goto error;
|
||||
|
||||
d3d9x_buffer_release(pShaderCode);
|
||||
|
||||
if (!d3d9x_compile_shader(font_hlsl_d3d9_program, sizeof(font_hlsl_d3d9_program)-1 ,
|
||||
NULL, NULL, "main_fragment", "ps.2.0", 0,&pShaderCode, NULL, NULL ))
|
||||
goto error;
|
||||
|
||||
if (!d3d9_create_pixel_shader(dev, (DWORD*)pShaderCode->GetBufferPointer(),
|
||||
(void**)&font->s_FontLocals.m_pFontPixelShader))
|
||||
goto error;
|
||||
|
||||
d3d9x_buffer_release(pShaderCode);
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
if (pShaderCode)
|
||||
d3d9x_buffer_release(pShaderCode);
|
||||
d3d9_free_pixel_shader((LPDIRECT3DDEVICE9)font->d3d->dev, font->s_FontLocals.m_pFontPixelShader);
|
||||
d3d9_free_vertex_shader((LPDIRECT3DDEVICE9)font->d3d->dev, font->s_FontLocals.m_pFontVertexShader);
|
||||
d3d9_vertex_declaration_free(font->s_FontLocals.m_pFontVertexDecl);
|
||||
font->s_FontLocals.m_pFontPixelShader = NULL;
|
||||
font->s_FontLocals.m_pFontVertexShader = NULL;
|
||||
font->s_FontLocals.m_pFontVertexDecl = NULL;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void *xdk360_init_font(void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded)
|
||||
{
|
||||
uint32_t dwFileVersion;
|
||||
const void *pFontData = NULL;
|
||||
void *pFontTexture = NULL;
|
||||
const uint8_t * pData = NULL;
|
||||
xdk360_video_font_t *font = (xdk360_video_font_t*)calloc(1, sizeof(*font));
|
||||
|
||||
if (!font)
|
||||
return NULL;
|
||||
|
||||
(void)font_size;
|
||||
|
||||
font->d3d = (d3d9_video_t*)video_data;
|
||||
|
||||
font->m_pFontTexture = NULL;
|
||||
font->m_dwNumGlyphs = 0L;
|
||||
font->m_Glyphs = NULL;
|
||||
font->m_cMaxGlyph = 0;
|
||||
font->m_TranslatorTable = NULL;
|
||||
|
||||
/* Create the font. */
|
||||
if (FAILED( m_xprResource.Create(font_path, 0, NULL)))
|
||||
goto error;
|
||||
|
||||
pFontTexture = (LPDIRECT3DTEXTURE9)m_xprResource.GetTexture( "FontTexture" );
|
||||
pFontData = m_xprResource.GetData( "FontData");
|
||||
|
||||
/* Save a copy of the texture. */
|
||||
font->m_pFontTexture = (LPDIRECT3DTEXTURE9)pFontTexture;
|
||||
|
||||
/* Check version of file (to make sure it matches up with the FontMaker tool). */
|
||||
pData = (const uint8_t*)pFontData;
|
||||
dwFileVersion = ((const FontFileHeaderImage_t *)pData)->m_dwFileVersion;
|
||||
|
||||
if (dwFileVersion != FONTFILEVERSION)
|
||||
{
|
||||
RARCH_ERR("Incorrect version number on font file.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
font->m_fFontHeight = ((const FontFileHeaderImage_t *)pData)->m_fFontHeight;
|
||||
font->m_fFontTopPadding = ((const FontFileHeaderImage_t *)pData)->m_fFontTopPadding;
|
||||
font->m_fFontBottomPadding = ((const FontFileHeaderImage_t *)pData)->m_fFontBottomPadding;
|
||||
font->m_fFontYAdvance = ((const FontFileHeaderImage_t *)pData)->m_fFontYAdvance;
|
||||
|
||||
/* Point to the translator string which immediately follows the 4 floats. */
|
||||
font->m_cMaxGlyph = ((const FontFileHeaderImage_t *)pData)->m_cMaxGlyph;
|
||||
font->m_TranslatorTable = const_cast<FontFileHeaderImage_t*>((const FontFileHeaderImage_t *)pData)->m_TranslatorTable;
|
||||
|
||||
pData += CALCFONTFILEHEADERSIZE(font->m_cMaxGlyph + 1);
|
||||
|
||||
/* Read the glyph attributes from the file. */
|
||||
font->m_dwNumGlyphs = ((const FontFileStrikesImage_t *)pData)->m_dwNumGlyphs;
|
||||
font->m_Glyphs = ((const FontFileStrikesImage_t *)pData)->m_Glyphs;
|
||||
|
||||
/* Create the vertex and pixel shaders for rendering the font */
|
||||
if (!xdk360_video_font_create_shaders(font, (LPDIRECT3DDEVICE9)font->d3d->dev))
|
||||
{
|
||||
RARCH_ERR( "Could not create font shaders.\n" );
|
||||
goto error;
|
||||
}
|
||||
|
||||
RARCH_LOG("Successfully initialized D3D9 HLSL fonts.\n");
|
||||
return font;
|
||||
error:
|
||||
RARCH_ERR("Could not initialize D3D9 HLSL fonts.\n");
|
||||
if (font)
|
||||
free(font);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void xdk360_free_font(void *data, bool is_threaded)
|
||||
{
|
||||
xdk360_video_font_t *font = (xdk360_video_font_t*)data;
|
||||
|
||||
if (!font)
|
||||
return;
|
||||
|
||||
/* Destroy the font */
|
||||
font->m_pFontTexture = NULL;
|
||||
font->m_dwNumGlyphs = 0L;
|
||||
font->m_Glyphs = NULL;
|
||||
font->m_cMaxGlyph = 0;
|
||||
font->m_TranslatorTable = NULL;
|
||||
|
||||
d3d9_free_pixel_shader((LPDIRECT3DDEVICE9)font->d3d->dev, font->s_FontLocals.m_pFontPixelShader);
|
||||
d3d9_free_vertex_shader((LPDIRECT3DDEVICE9)font->d3d->dev, font->s_FontLocals.m_pFontVertexShader);
|
||||
d3d9_vertex_declaration_free(font->s_FontLocals.m_pFontVertexDecl);
|
||||
|
||||
font->s_FontLocals.m_pFontPixelShader = NULL;
|
||||
font->s_FontLocals.m_pFontVertexShader = NULL;
|
||||
font->s_FontLocals.m_pFontVertexDecl = NULL;
|
||||
|
||||
if (m_xprResource.m_bInitialized)
|
||||
m_xprResource.Destroy();
|
||||
|
||||
free(font);
|
||||
font = NULL;
|
||||
}
|
||||
|
||||
static void xdk360_render_msg_post(xdk360_video_font_t * font)
|
||||
{
|
||||
LPDIRECT3DDEVICE9 dev;
|
||||
if (!font || !font->d3d)
|
||||
return;
|
||||
dev = (LPDIRECT3DDEVICE9)font->d3d->dev;
|
||||
|
||||
if (!dev)
|
||||
return;
|
||||
|
||||
d3d9_set_texture(dev, 0, NULL);
|
||||
d3d9_set_vertex_declaration(dev, NULL);
|
||||
d3d9_set_vertex_shader(dev, NULL);
|
||||
d3d9_set_pixel_shader(dev, NULL);
|
||||
d3d9_set_render_state(dev, D3DRS_VIEWPORTENABLE, font->m_dwSavedState);
|
||||
}
|
||||
|
||||
static void xdk360_render_msg_pre(xdk360_video_font_t * font)
|
||||
{
|
||||
float vTexScale[4];
|
||||
D3DSURFACE_DESC TextureDesc;
|
||||
LPDIRECT3DDEVICE9 dev;
|
||||
|
||||
if (!font || !font->d3d)
|
||||
return;
|
||||
|
||||
dev = (LPDIRECT3DDEVICE9)font->d3d->dev;
|
||||
|
||||
if (!dev)
|
||||
return;
|
||||
|
||||
/* Save state. */
|
||||
d3d9_get_render_state(font->d3d->dev, D3DRS_VIEWPORTENABLE,
|
||||
(DWORD*)&font->m_dwSavedState );
|
||||
|
||||
/* Set the texture scaling factor as a vertex shader constant. */
|
||||
/* Get the description */
|
||||
d3d9_texture_get_level_desc(font->m_pFontTexture, 0, &TextureDesc);
|
||||
|
||||
/* Set render state. */
|
||||
d3d9_set_texture(dev, 0, font->m_pFontTexture);
|
||||
|
||||
vTexScale[0] = 1.0f / TextureDesc.Width;
|
||||
vTexScale[1] = 1.0f / TextureDesc.Height;
|
||||
vTexScale[2] = 0.0f;
|
||||
vTexScale[3] = 0.0f;
|
||||
|
||||
d3d9_set_render_state(dev, D3DRS_VIEWPORTENABLE, FALSE);
|
||||
d3d9_set_vertex_declaration(dev, font->s_FontLocals.m_pFontVertexDecl);
|
||||
d3d9_set_vertex_shader(dev, font->s_FontLocals.m_pFontVertexShader);
|
||||
d3d9_set_pixel_shader(dev, font->s_FontLocals.m_pFontPixelShader);
|
||||
d3d9_set_vertex_shader_constantf(dev, 2, vTexScale, 1);
|
||||
}
|
||||
|
||||
static void xdk360_draw_text(xdk360_video_font_t *font,
|
||||
float x, float y, const wchar_t * strText)
|
||||
{
|
||||
uint32_t dwNumChars;
|
||||
float vColor[4], m_fCursorX, m_fCursorY;
|
||||
volatile float *pVertex = NULL;
|
||||
LPDIRECT3DDEVICE9 dev = (LPDIRECT3DDEVICE9)font->d3d->dev;
|
||||
|
||||
/* Set the color as a vertex shader constant. */
|
||||
vColor[0] = ((0xffffffff & 0x00ff0000) >> 16L) / 255.0f;
|
||||
vColor[1] = ((0xffffffff & 0x0000ff00) >> 8L) / 255.0f;
|
||||
vColor[2] = ((0xffffffff & 0x000000ff) >> 0L) / 255.0f;
|
||||
vColor[3] = ((0xffffffff & 0xff000000) >> 24L) / 255.0f;
|
||||
|
||||
d3d9_set_vertex_shader_constantf(dev, 1, vColor, 1);
|
||||
|
||||
m_fCursorX = floorf(x);
|
||||
m_fCursorY = floorf(y);
|
||||
|
||||
/* Adjust for padding. */
|
||||
y -= font->m_fFontTopPadding;
|
||||
|
||||
/* Begin drawing the vertices
|
||||
* Declared as volatile to force writing in ascending
|
||||
* address order.
|
||||
*
|
||||
* It prevents out of sequence writing in write combined
|
||||
* memory.
|
||||
*/
|
||||
|
||||
dwNumChars = wcslen(strText);
|
||||
#ifdef __cplusplus
|
||||
dev->BeginVertices(D3DPT_QUADLIST, 4 * dwNumChars,
|
||||
sizeof(XMFLOAT4), (void**)&pVertex);
|
||||
#else
|
||||
D3DDevice_BeginVertices(dev, D3DPT_QUADLIST, 4 * dwNumChars,
|
||||
sizeof(XMFLOAT4), (void**)&pVertex);
|
||||
#endif
|
||||
|
||||
/* Draw four vertices for each glyph. */
|
||||
while (*strText)
|
||||
{
|
||||
float fOffset, fAdvance, fWidth, fHeight;
|
||||
#ifdef MSB_FIRST
|
||||
uint32_t tu1, tu2, tv1, tv2;
|
||||
#endif
|
||||
const GLYPH_ATTR *pGlyph;
|
||||
wchar_t letter = *strText++; /* Get the current letter in the string */
|
||||
|
||||
/* Handle the newline character. */
|
||||
if (letter == L'\n')
|
||||
{
|
||||
m_fCursorX = x;
|
||||
m_fCursorY += font->m_fFontYAdvance * FONT_SCALE(font->d3d);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Translate unprintable characters. */
|
||||
if (letter <= font->m_cMaxGlyph)
|
||||
pGlyph = &font->m_Glyphs[font->m_TranslatorTable[letter]];
|
||||
else
|
||||
pGlyph = &font->m_Glyphs[0];
|
||||
|
||||
fOffset = FONT_SCALE(font->d3d) * (float)pGlyph->wOffset;
|
||||
fAdvance = FONT_SCALE(font->d3d) * (float)pGlyph->wAdvance;
|
||||
fWidth = FONT_SCALE(font->d3d) * (float)pGlyph->wWidth;
|
||||
fHeight = FONT_SCALE(font->d3d) * font->m_fFontHeight;
|
||||
|
||||
m_fCursorX += fOffset;
|
||||
|
||||
/* Add the vertices to draw this glyph. */
|
||||
|
||||
#ifdef MSB_FIRST
|
||||
/* Convert shorts to 32 bit longs for in register merging */
|
||||
tu1 = pGlyph->tu1;
|
||||
tv1 = pGlyph->tv1;
|
||||
tu2 = pGlyph->tu2;
|
||||
tv2 = pGlyph->tv2;
|
||||
#endif
|
||||
|
||||
/* NOTE: The vertexes are 2 floats for the screen coordinates,
|
||||
* followed by two USHORTS for the u/vs of the character,
|
||||
* terminated with the ARGB 32 bit color.
|
||||
*
|
||||
* This makes for 16 bytes per vertex data (Easier to read)
|
||||
*
|
||||
* Second NOTE: The U/V coordinates are merged and written
|
||||
* using a DWORD due to the write combining hardware
|
||||
* being only able to handle 32, 64 and 128 writes.
|
||||
*
|
||||
* Never store to write combined memory with 8 or 16bit
|
||||
* instructions. You've been warned.
|
||||
*/
|
||||
|
||||
/* Setup the vertex/screen coordinates */
|
||||
pVertex[0] = m_fCursorX;
|
||||
pVertex[1] = m_fCursorY;
|
||||
pVertex[3] = 0;
|
||||
pVertex[4] = m_fCursorX + fWidth;
|
||||
pVertex[5] = m_fCursorY;
|
||||
pVertex[7] = 0;
|
||||
pVertex[8] = m_fCursorX + fWidth;
|
||||
pVertex[9] = m_fCursorY + fHeight;
|
||||
pVertex[11] = 0;
|
||||
pVertex[12] = m_fCursorX;
|
||||
pVertex[13] = m_fCursorY + fHeight;
|
||||
#ifdef MSB_FIRST
|
||||
((volatile uint32_t *)pVertex)[2] = (tu1 << 16) | tv1; /* Merged using big endian rules */
|
||||
((volatile uint32_t *)pVertex)[6] = (tu2 << 16) | tv1; /* Merged using big endian rules */
|
||||
((volatile uint32_t*)pVertex)[10] = (tu2 << 16) | tv2; /* Merged using big endian rules */
|
||||
((volatile uint32_t*)pVertex)[14] = (tu1 << 16) | tv2; /* Merged using big endian rules */
|
||||
#endif
|
||||
pVertex[15] = 0;
|
||||
pVertex += 16;
|
||||
|
||||
m_fCursorX += fAdvance;
|
||||
|
||||
dwNumChars--;
|
||||
}
|
||||
|
||||
/* Since we allocated vertex data space
|
||||
* based on the string length, we now need to
|
||||
* add some dummy verts for any skipped
|
||||
* characters (like newlines, etc.)
|
||||
*/
|
||||
while (dwNumChars)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < 16; i++)
|
||||
pVertex[i] = 0;
|
||||
|
||||
pVertex += 16;
|
||||
dwNumChars--;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
dev->EndVertices();
|
||||
#else
|
||||
D3DDevice_EndVertices(dev);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void xdk360_render_msg(
|
||||
video_frame_info_t *video_info,
|
||||
void *data, const char *str_msg,
|
||||
const struct font_params *params)
|
||||
{
|
||||
float x, y;
|
||||
wchar_t msg[PATH_MAX_LENGTH];
|
||||
xdk360_video_font_t *font = (xdk360_video_font_t*)data;
|
||||
|
||||
if (params)
|
||||
{
|
||||
x = params->x;
|
||||
y = params->y;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = font->d3d->resolution_hd_enable ? 160 : 100;
|
||||
y = 120;
|
||||
}
|
||||
|
||||
mbstowcs(msg, str_msg, sizeof(msg) / sizeof(wchar_t));
|
||||
|
||||
if (msg || msg[0] != L'\0')
|
||||
{
|
||||
xdk360_render_msg_pre(font);
|
||||
xdk360_draw_text(font, x, y, msg);
|
||||
xdk360_render_msg_post(font);
|
||||
}
|
||||
}
|
||||
|
||||
font_renderer_t d3d_xbox360_font = {
|
||||
xdk360_init_font,
|
||||
xdk360_free_font,
|
||||
xdk360_render_msg,
|
||||
"xdk360_fonts",
|
||||
NULL, /* get_glyph */
|
||||
NULL, /* bind_block */
|
||||
NULL, /* flush */
|
||||
NULL /* get_message_width */
|
||||
};
|
@ -119,9 +119,7 @@ static bool d3d8_font_init_first(
|
||||
|
||||
#ifdef HAVE_D3D9
|
||||
static const font_renderer_t *d3d9_font_backends[] = {
|
||||
#if defined(_XBOX)
|
||||
&d3d_xbox360_font,
|
||||
#elif defined(_WIN32) && defined(HAVE_D3DX)
|
||||
#if defined(_WIN32) && defined(HAVE_D3DX)
|
||||
&d3d_win32_font,
|
||||
#endif
|
||||
NULL
|
||||
|
@ -162,7 +162,6 @@ int font_driver_get_line_height(void *font_data, float scale);
|
||||
extern font_renderer_t gl_raster_font;
|
||||
extern font_renderer_t gl_core_raster_font;
|
||||
extern font_renderer_t gl1_raster_font;
|
||||
extern font_renderer_t d3d_xbox360_font;
|
||||
extern font_renderer_t d3d_xdk1_font;
|
||||
extern font_renderer_t d3d_win32_font;
|
||||
extern font_renderer_t ps2_font;
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#if defined(HAVE_VIDEOCORE)
|
||||
#include "include/userland/interface/vmcs_host/vc_vchi_gencmd.h"
|
||||
static void crt_rpi_switch(int width, int height, float hz);
|
||||
static void crt_rpi_switch(int width, int height, float hz, int xoffset);
|
||||
#endif
|
||||
|
||||
static unsigned ra_core_width = 0;
|
||||
@ -99,7 +99,7 @@ static void switch_res_crt(unsigned width, unsigned height)
|
||||
video_display_server_set_resolution(width, height,
|
||||
ra_set_core_hz, ra_core_hz, crt_center_adjust, crt_index, crt_center_adjust);
|
||||
#if defined(HAVE_VIDEOCORE)
|
||||
crt_rpi_switch(width, height, ra_core_hz);
|
||||
crt_rpi_switch(width, height, ra_core_hz, crt_center_adjust);
|
||||
video_monitor_set_refresh_rate(ra_core_hz);
|
||||
crt_switch_driver_reinit();
|
||||
#endif
|
||||
@ -259,7 +259,7 @@ int crt_compute_dynamic_width(int width)
|
||||
}
|
||||
|
||||
#if defined(HAVE_VIDEOCORE)
|
||||
static void crt_rpi_switch(int width, int height, float hz)
|
||||
static void crt_rpi_switch(int width, int height, float hz, int xoffset)
|
||||
{
|
||||
char buffer[1024];
|
||||
VCHI_INSTANCE_T vchi_instance;
|
||||
@ -289,27 +289,18 @@ static void crt_rpi_switch(int width, int height, float hz)
|
||||
video_monitor_set_refresh_rate(hz);
|
||||
|
||||
/* following code is the mode line generator */
|
||||
|
||||
pwidth = width;
|
||||
|
||||
if (height < 400 && width > 400)
|
||||
pwidth = width / 2;
|
||||
|
||||
roundw = roundf((float)pwidth / (float)height * 100) / 100;
|
||||
|
||||
if (height > width)
|
||||
roundw = roundf((float)height / (float)width * 100) / 100;
|
||||
|
||||
if (roundw > 1.35)
|
||||
roundw = 1.25;
|
||||
|
||||
if (roundw < 1.20)
|
||||
roundw = 1.34;
|
||||
hfp = width * 0.065;
|
||||
|
||||
hsp = width * 0.1433-hfp+(crt_center_adjust*4);
|
||||
|
||||
hbp = width * 0.3-hsp-hfp;
|
||||
hsp = (width * 0.117) - (xoffset*4);
|
||||
if (width < 700)
|
||||
{
|
||||
hfp = (width * 0.065);
|
||||
hbp = width * 0.35-hsp-hfp;
|
||||
}else {
|
||||
hfp = (width * 0.033) + (width / 112);
|
||||
hbp = (width * 0.225) + (width /58);
|
||||
xoffset = xoffset*2;
|
||||
}
|
||||
|
||||
hmax = hbp;
|
||||
|
||||
if (height < 241)
|
||||
vmax = 261;
|
||||
|
@ -123,10 +123,6 @@ VIDEO DRIVER
|
||||
/*============================================================
|
||||
FONTS
|
||||
============================================================ */
|
||||
#if defined(_XBOX360)
|
||||
#include "../gfx/drivers_font/xdk360_fonts.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef WANT_GLSLANG
|
||||
#ifdef _WIN32
|
||||
#include "../deps/glslang/glslang/glslang/OSDependent/Windows/ossource.cpp"
|
||||
|
@ -122,6 +122,10 @@ typedef struct switch_input
|
||||
Touch finger[MAX_NUM_FINGERS]; /* keep track of finger status for touch mouse */
|
||||
DraggingType multi_finger_dragging; /* keep track whether we are currently drag-and-dropping */
|
||||
int32_t simulated_click_start_time[2]; /* initiation time of last simulated left or right click (zero if no click) */
|
||||
|
||||
/* sensor handles */
|
||||
uint32_t sixaxis_handles[DEFAULT_MAX_PADS][4];
|
||||
unsigned sixaxis_handles_count[DEFAULT_MAX_PADS];
|
||||
#endif
|
||||
} switch_input_t;
|
||||
|
||||
@ -805,12 +809,21 @@ void finish_simulated_mouse_clicks(switch_input_t *sw, uint64_t currentTime)
|
||||
|
||||
static void switch_input_free_input(void *data)
|
||||
{
|
||||
unsigned i,j;
|
||||
switch_input_t *sw = (switch_input_t*) data;
|
||||
|
||||
if (sw && sw->joypad)
|
||||
sw->joypad->destroy();
|
||||
if (sw)
|
||||
{
|
||||
if(sw->joypad)
|
||||
sw->joypad->destroy();
|
||||
|
||||
free(sw);
|
||||
for(i = 0; i < DEFAULT_MAX_PADS; i++)
|
||||
if(sw->sixaxis_handles_count[i] > 0)
|
||||
for(j = 0; j < sw->sixaxis_handles_count[i]; j++)
|
||||
hidStopSixAxisSensor(sw->sixaxis_handles[i][j]);
|
||||
|
||||
free(sw);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
hidExit();
|
||||
@ -844,7 +857,6 @@ static void* switch_input_init(const char *joypad_driver)
|
||||
sw->mouse_y = 0;
|
||||
sw->mouse_previous_report = 0;
|
||||
|
||||
|
||||
/* touch mouse init */
|
||||
sw->touch_mouse_indirect = true; /* direct mode is not calibrated it seems */
|
||||
sw->touch_mouse_speed_factor = 1.0;
|
||||
@ -855,6 +867,9 @@ static void* switch_input_init(const char *joypad_driver)
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
sw->simulated_click_start_time[i] = 0;
|
||||
|
||||
for(i = 0; i < DEFAULT_MAX_PADS; i++)
|
||||
sw->sixaxis_handles_count[i] = 0;
|
||||
#endif
|
||||
|
||||
return sw;
|
||||
@ -900,19 +915,112 @@ static bool switch_input_set_rumble(void *data, unsigned port,
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool switch_input_set_sensor_state(void *data, unsigned port,
|
||||
enum retro_sensor_action action, unsigned event_rate)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
unsigned i, handles_count;
|
||||
bool available;
|
||||
switch_input_t *sw = (switch_input_t*) data;
|
||||
|
||||
if(!sw)
|
||||
return false;
|
||||
|
||||
switch(action)
|
||||
{
|
||||
case RETRO_SENSOR_ILLUMINANCE_ENABLE:
|
||||
available = false;
|
||||
appletIsIlluminanceAvailable(&available);
|
||||
return available;
|
||||
|
||||
case RETRO_SENSOR_ILLUMINANCE_DISABLE:
|
||||
case RETRO_SENSOR_ACCELEROMETER_DISABLE:
|
||||
case RETRO_SENSOR_GYROSCOPE_DISABLE:
|
||||
return true;
|
||||
|
||||
case RETRO_SENSOR_ACCELEROMETER_ENABLE:
|
||||
case RETRO_SENSOR_GYROSCOPE_ENABLE:
|
||||
if(port < DEFAULT_MAX_PADS && sw->sixaxis_handles_count[port] == 0)
|
||||
{
|
||||
hidGetSixAxisSensorHandles(&sw->sixaxis_handles[port][0], 2, port, TYPE_JOYCON_PAIR);
|
||||
|
||||
hidGetSixAxisSensorHandles(&sw->sixaxis_handles[port][2], 1, port, TYPE_PROCONTROLLER);
|
||||
|
||||
if(port == 0)
|
||||
{
|
||||
hidGetSixAxisSensorHandles(&sw->sixaxis_handles[port][3], 1, CONTROLLER_HANDHELD, TYPE_HANDHELD);
|
||||
handles_count = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
handles_count = 3;
|
||||
}
|
||||
|
||||
for(i = 0; i < handles_count; i++) {
|
||||
hidStartSixAxisSensor(sw->sixaxis_handles[port][i]);
|
||||
}
|
||||
|
||||
sw->sixaxis_handles_count[port] = handles_count;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static float switch_input_get_sensor_input(void *data,
|
||||
unsigned port, unsigned id)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
float f;
|
||||
SixAxisSensorValues sixaxis;
|
||||
|
||||
if(id >= RETRO_SENSOR_ACCELEROMETER_X && id <= RETRO_SENSOR_GYROSCOPE_Z)
|
||||
{
|
||||
hidSixAxisSensorValuesRead(&sixaxis, port == 0 ? CONTROLLER_P1_AUTO : port, 1);
|
||||
|
||||
switch(id)
|
||||
{
|
||||
case RETRO_SENSOR_ACCELEROMETER_X:
|
||||
return sixaxis.accelerometer.x;
|
||||
case RETRO_SENSOR_ACCELEROMETER_Y:
|
||||
return sixaxis.accelerometer.y;
|
||||
case RETRO_SENSOR_ACCELEROMETER_Z:
|
||||
return sixaxis.accelerometer.z;
|
||||
case RETRO_SENSOR_GYROSCOPE_X:
|
||||
return sixaxis.gyroscope.x;
|
||||
case RETRO_SENSOR_GYROSCOPE_Y:
|
||||
return sixaxis.gyroscope.y;
|
||||
case RETRO_SENSOR_GYROSCOPE_Z:
|
||||
return sixaxis.gyroscope.z;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(id == RETRO_SENSOR_ILLUMINANCE)
|
||||
{
|
||||
appletGetCurrentIlluminance(&f);
|
||||
return f;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
input_driver_t input_switch = {
|
||||
switch_input_init,
|
||||
switch_input_poll,
|
||||
switch_input_state,
|
||||
switch_input_free_input,
|
||||
NULL,
|
||||
NULL,
|
||||
switch_input_get_capabilities,
|
||||
"switch",
|
||||
switch_input_grab_mouse,
|
||||
NULL,
|
||||
switch_input_set_rumble,
|
||||
switch_input_get_joypad_driver,
|
||||
NULL,
|
||||
switch_input_init,
|
||||
switch_input_poll,
|
||||
switch_input_state,
|
||||
switch_input_free_input,
|
||||
switch_input_set_sensor_state,
|
||||
switch_input_get_sensor_input,
|
||||
switch_input_get_capabilities,
|
||||
"switch",
|
||||
switch_input_grab_mouse,
|
||||
NULL,
|
||||
switch_input_set_rumble,
|
||||
switch_input_get_joypad_driver,
|
||||
NULL,
|
||||
false
|
||||
};
|
||||
|
@ -3885,7 +3885,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -4903,7 +4903,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -3661,7 +3661,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -3790,7 +3790,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -7860,7 +7860,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -3549,7 +3549,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -8010,7 +8010,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
@ -317,7 +317,7 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len, "Crée une capture d'écran. \n"
|
||||
" \n"
|
||||
"La capture d'écran sera sauvegardée \n"
|
||||
"dans le dossier des captures d'écran.");
|
||||
"dans le dossier assigné aux captures d'écran.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_ADD_TO_FAVORITES:
|
||||
snprintf(s, len, "Ajoute l'entrée à vos favoris.");
|
||||
@ -357,7 +357,7 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Dossier de base de données de contenu. \n"
|
||||
" \n"
|
||||
"emplacement du dossier de la base de données \n"
|
||||
"Emplacement du dossier de la base de données \n"
|
||||
"de contenu.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY:
|
||||
@ -596,7 +596,7 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_FPS_SHOW:
|
||||
snprintf(s, len,
|
||||
"Permet d'afficher les images par seconde \n"
|
||||
"Permet d'afficher le nombre d'images par seconde \n"
|
||||
"actuelles.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MEMORY_SHOW:
|
||||
@ -630,7 +630,7 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT:
|
||||
snprintf(s, len,
|
||||
"Selectionne le port d'écoute des touches pressées affichées \n"
|
||||
"Sélectionne le port d'écoute des touches pressées \n"
|
||||
"affichées sur la surimpression à l'écran.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERLAY_PRESET:
|
||||
@ -640,6 +640,21 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
case MENU_ENUM_LABEL_OVERLAY_OPACITY:
|
||||
snprintf(s, len,
|
||||
"Opacité de la surimpression.");
|
||||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
case MENU_ENUM_LABEL_VIDEO_LAYOUT_ENABLE:
|
||||
snprintf(s, len,
|
||||
"Active ou désactive la disposition d'affichage actuelle.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_LAYOUT_PATH:
|
||||
snprintf(s, len,
|
||||
"Emplacement de la disposition d'affichage.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_LAYOUT_SELECTED_VIEW:
|
||||
snprintf(s, len,
|
||||
"Les dispositions d'affichage peuvent contenir plusieurs vues. \n"
|
||||
"Sélectionne une vue.");
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT:
|
||||
snprintf(s, len,
|
||||
@ -740,7 +755,7 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"au lieu de devoir passer par le navigateur de fichiers\n"
|
||||
"à chaque fois.\n"
|
||||
"\n"
|
||||
"REMERQUE : le contenu de certains cœurs peut toujours\n"
|
||||
"REMARQUE : le contenu de certains cœurs peut toujours\n"
|
||||
"ne pas être analysable.",
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY),
|
||||
@ -820,7 +835,7 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Charger du contenu depuis l'historique. \n"
|
||||
" \n"
|
||||
"Lorsque le contenu est chargé,les combinaisons de contenu \n"
|
||||
"Lorsque le contenu est chargé, les combinaisons de contenu \n"
|
||||
"et de cœur libretro sont enregistrées dans l'historique. \n"
|
||||
" \n"
|
||||
"L'historique est enregistré dans un fichier dans le même \n"
|
||||
@ -955,7 +970,7 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
snprintf(s, len,
|
||||
"Echelle pour ce passage. \n"
|
||||
"Échelle pour ce passage. \n"
|
||||
" \n"
|
||||
"Le facteur d’échelle s’accumule, c’est-à-dire \n"
|
||||
"2x pour le premier passage et 2x pour le second \n"
|
||||
@ -1203,7 +1218,7 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
" \n"
|
||||
"Si cette touche de raccourci est liée à un clavier, \n"
|
||||
"à une touche ou à un axe de manette, toutes les autres \n"
|
||||
"touches de raccourci sont désactivées, à moins que \n"
|
||||
"touches de raccourci seront désactivées, à moins que \n"
|
||||
"ce raccourci ne soit également maintenu enfoncé. \n"
|
||||
" \n"
|
||||
"Cette option est utile pour les implémentations \n"
|
||||
@ -1391,9 +1406,9 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SYSTEM_DIRECTORY:
|
||||
snprintf(s, len,
|
||||
"Dossier système. \n"
|
||||
"Dossier 'Système'. \n"
|
||||
" \n"
|
||||
"Définit le dossier 'système'.\n"
|
||||
"Définit le dossier 'Système'.\n"
|
||||
"Les cœurs peuvent rechercher dans\n"
|
||||
"ce dossier les BIOS, configurations \n"
|
||||
"spécifiques au système, etc.");
|
||||
@ -1412,13 +1427,13 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Utilise le pilote vidéo sur plusieurs fils d'exécution.\n"
|
||||
" \n"
|
||||
"Cette option peut améliorer la performance au détriment \n"
|
||||
"d'une latence et de saccades visuelles possiblement \n"
|
||||
"accrues.");
|
||||
"Cette option peut améliorer la performance \n"
|
||||
"au détriment possible d'une latence \n"
|
||||
"et de saccades visuelles accrues.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_VSYNC:
|
||||
snprintf(s, len,
|
||||
"Synchronisation vertivale vidéo (V-Sync).\n");
|
||||
"Synchronisation verticale vidéo (V-Sync).\n");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_HARD_SYNC:
|
||||
snprintf(s, len,
|
||||
@ -1463,10 +1478,18 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"avant l'exécution du cœur.\n"
|
||||
"\n"
|
||||
"Peut réduire la latence au prix\n"
|
||||
"d'un risque accru de saccades.\n"
|
||||
"d'un plus grand risque de saccades.\n"
|
||||
" \n"
|
||||
"La valeur maximum est 15.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_DELAY:
|
||||
snprintf(s, len,
|
||||
"Définit le délai en millisecondes après lequel\n"
|
||||
"les shaders sont chargés.\n"
|
||||
"\n"
|
||||
"Peut résoudre des problèmes graphiques\n"
|
||||
"lors de l'utilisation de logiciels de 'capture d'écran'.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES:
|
||||
snprintf(s, len,
|
||||
"Nombre d'images que le processeur peut éxécuter en avance \n"
|
||||
@ -1794,7 +1817,7 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_DISCONNECT:
|
||||
snprintf(s, len,
|
||||
"Déconnect une connexion de jeu en réseau active.");
|
||||
"Déconnecte une connexion de jeu en réseau active.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS:
|
||||
snprintf(s, len,
|
||||
@ -1827,11 +1850,20 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERLAY_DIRECTORY:
|
||||
snprintf(s, len,
|
||||
"Dossier des surimpressions. \n"
|
||||
"Dossier des Surimpressions. \n"
|
||||
" \n"
|
||||
"Définit un dossier dans lequel les surimpressions \n"
|
||||
"seront conservées pour un accès facile.");
|
||||
break;
|
||||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
case MENU_ENUM_LABEL_VIDEO_LAYOUT_DIRECTORY:
|
||||
snprintf(s, len,
|
||||
"Dossier des Dispositions d'affichage. \n"
|
||||
" \n"
|
||||
"Définit un dossier dans lequel les dispositions d'affichage \n"
|
||||
"seront conservées pour un accès facile.");
|
||||
break;
|
||||
#endif
|
||||
case MENU_ENUM_LABEL_INPUT_MAX_USERS:
|
||||
snprintf(s, len,
|
||||
"Nombre maximum d'utilisateurs pris en charge par \n"
|
||||
@ -1856,11 +1888,11 @@ int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
case MENU_ENUM_LABEL_NETPLAY_TCP_UDP_PORT:
|
||||
snprintf(s, len,
|
||||
"Port de l'adresse IP de l'hôte. \n"
|
||||
"Can be either a TCP or UDP port.");
|
||||
"Peut être soit un port TCP soit UDP.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_SPECTATOR_MODE_ENABLE:
|
||||
snprintf(s, len,
|
||||
"Active ou désactive le modespectateur pour \n"
|
||||
"Active ou désactive le mode spectateur pour \n"
|
||||
"l'utilisateur durant le jeu en réseau.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS:
|
||||
|
15290
intl/msg_hash_fr.h
15290
intl/msg_hash_fr.h
File diff suppressed because it is too large
Load Diff
@ -3770,7 +3770,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -9317,7 +9317,7 @@ MSG_HASH(
|
||||
"AIサービス有効"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, /* TODO/FIXME - update this - see US original */
|
||||
"'Image mode'は翻訳中にゲームを一時停止, 'Speech mode'は実行継続します。"
|
||||
)
|
||||
MSG_HASH(
|
||||
|
@ -9182,7 +9182,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
"AI 서비스 URL")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI 서비스 사용")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, /* TODO/FIXME - update this - see US original */
|
||||
"번역하는 동안 게임을 일시정지(이미지모드) 하거나 계속해서 실행(음성모드)합니다")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"번역 서비스에서 사용할 http:// 주소입니다.")
|
||||
|
@ -727,6 +727,8 @@ MSG_HASH(MENU_ENUM_LABEL_OZONE_SCROLL_CONTENT_METADATA,
|
||||
"ozone_scroll_content_metadata")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME,
|
||||
"materialui_menu_color_theme")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_TRANSITION_ANIMATION,
|
||||
"materialui_menu_transition_animation")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_FOOTER_OPACITY,
|
||||
"materialui_menu_footer_opacity")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_HEADER_OPACITY,
|
||||
@ -1663,6 +1665,10 @@ MSG_HASH(MENU_ENUM_LABEL_GOTO_VIDEO,
|
||||
"goto_video")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE,
|
||||
"materialui_icons_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT,
|
||||
"materialui_optimize_landscape_layout")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR,
|
||||
"materialui_auto_rotate_nav_bar")
|
||||
MSG_HASH(MENU_ENUM_LABEL_RENAME_ENTRY,
|
||||
"rename_entry")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_LOAD_CORE,
|
||||
@ -2093,3 +2099,7 @@ MSG_HASH(MENU_ENUM_LABEL_DELETE_PLAYLIST,
|
||||
MSG_HASH(MENU_ENUM_LABEL_LOCALAP_ENABLE,
|
||||
"localap_enable")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_DRIVER_SWITCH_ENABLE,
|
||||
"driver_switch_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_AI_SERVICE_PAUSE,
|
||||
"ai_service_pause")
|
||||
|
@ -3543,7 +3543,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Ingeschakeld")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -1022,9 +1022,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST,
|
||||
"Załaduj zawartość")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_LOAD_DISC,
|
||||
"Load Disc")
|
||||
"Załaduj dysk")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DUMP_DISC,
|
||||
"Dump Disc")
|
||||
"Zrzut dysku")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_LOAD_STATE,
|
||||
"Wczytaj zapis")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_LOCATION_ALLOW,
|
||||
@ -1064,7 +1064,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"Menu obrotowe przepustnicy częstotliwości wyświetlania klatek")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"File Browser")
|
||||
"Przeglądarka plików")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Menu filtra liniowego")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@ -1261,39 +1261,39 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS,
|
||||
"Listy odtwarzania")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE,
|
||||
"Label Display Mode"
|
||||
"Tryb wyświetlania etykiet"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE,
|
||||
"Change how the content labels are displayed in this playlist."
|
||||
"Zmień sposób wyświetlania etykiet treści na tej liście odtwarzania."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_DEFAULT,
|
||||
"Show full labels"
|
||||
"Pokaż pełne etykiety"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_REMOVE_PARENS,
|
||||
"Remove () content"
|
||||
"Usuń () treść"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_REMOVE_BRACKETS,
|
||||
"Remove [] content"
|
||||
"Usuń [] treść"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_REMOVE_PARENS_AND_BRACKETS,
|
||||
"Remove () and []"
|
||||
"Usuń () i []"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_KEEP_REGION,
|
||||
"Keep region"
|
||||
"Zachowaj region"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_KEEP_DISC_INDEX,
|
||||
"Keep disc index"
|
||||
"Zachowaj indeks płyty"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_KEEP_REGION_AND_DISC_INDEX,
|
||||
"Keep region and disc index"
|
||||
"Zachowaj indeks regionu i dysku"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_POINTER_ENABLE,
|
||||
"Obsługa dotyku")
|
||||
@ -4325,7 +4325,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
"Adres URL usługi AI")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"Usługa AI włączona")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, /* TODO/FIXME - update this - see US original */
|
||||
"Wstrzymuje grę podczas tłumaczenia (tryb obrazu) lub kontynuuje działanie (tryb mowy)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"Adres URL http: // wskazujący na usługę tłumaczeniową do użycia.")
|
||||
@ -4635,21 +4635,21 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
)
|
||||
#ifdef HAVE_LAKKA
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_LOCALAP_ENABLE,
|
||||
"Wi-Fi Access Point")
|
||||
"Punkt dostępu Wi-Fi")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_LOCALAP_ENABLE,
|
||||
"Enable or disable Wi-Fi Access Point.")
|
||||
"Włącz lub wyłącz punkt dostępu Wi-Fi.")
|
||||
MSG_HASH(MSG_LOCALAP_SWITCHING_OFF,
|
||||
"Switching off Wi-Fi Access Point.")
|
||||
"Wyłączanie punktu dostępu Wi-Fi.")
|
||||
MSG_HASH(MSG_WIFI_DISCONNECT_FROM,
|
||||
"Disconnecting from Wi-Fi '%s'")
|
||||
"Odłączanie od Wi-Fi '%s'")
|
||||
MSG_HASH(MSG_LOCALAP_ALREADY_RUNNING,
|
||||
"Wi-Fi Access Point is already started")
|
||||
"Punkt dostępu Wi-Fi jest już uruchomiony")
|
||||
MSG_HASH(MSG_LOCALAP_NOT_RUNNING,
|
||||
"Wi-Fi Access Point is not running")
|
||||
"Punkt dostępu Wi-Fi nie jest uruchomiony")
|
||||
MSG_HASH(MSG_LOCALAP_STARTING,
|
||||
"Starting Wi-Fi Access Point with SSID=%s and Passkey=%s")
|
||||
"Uruchamianie punktu dostępu Wi-Fi z SSID =% si kluczem dostępu=%s")
|
||||
MSG_HASH(MSG_LOCALAP_ERROR_CONFIG_CREATE,
|
||||
"Could not create Wi-Fi Access Point configuration file.")
|
||||
"Nie można utworzyć pliku konfiguracyjnego punktu dostępu Wi-Fi.")
|
||||
MSG_HASH(MSG_LOCALAP_ERROR_CONFIG_PARSE,
|
||||
"Wrong configuration file - could not find APNAME or PASSWORD in %s")
|
||||
"Niepoprawny plik konfiguracyjny - nie można znaleźć APNAME lub PASSWORD w %s")
|
||||
#endif
|
||||
|
@ -9186,7 +9186,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
"URL do Serviço de IA")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"Serviço de IA Habilitado")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, /* TODO/FIXME - update this - see US original */
|
||||
"Interrompe o jogo durante a tradução (modo Imagem) ou continua em execução (modo Fala)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"Um endereço http:// url apontando para o serviço de tradução a ser usado.")
|
||||
|
@ -3615,7 +3615,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -3813,7 +3813,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -8811,7 +8811,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
"AI Servis URL'si")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Servisi Etkinleştirildi")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, /* TODO/FIXME - update this - see US original */
|
||||
"Çeviri sırasında oyunu duraklatır (Görüntü modu) veya çalışmaya devam eder (Konuşma modu)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"Kullanılacak çeviri hizmetini gösteren bir http:// url'si.")
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3707,7 +3707,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE,
|
||||
"AI Service Enabled")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_MODE,
|
||||
"Pauses gameplay during translation (Image mode), or continues to run (Speech mode)")
|
||||
"Show translation as a text overlay (Image mode), or play as Text-To-Speech (Speech mode)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
|
||||
"A http:// url pointing to the translation service to use.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
|
||||
|
@ -5,10 +5,15 @@
|
||||
#include <file/file_path.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
static void cdfs_determine_sector_size(cdfs_file_t* file)
|
||||
#ifdef HAVE_CHD
|
||||
#include <streams/chd_stream.h>
|
||||
#endif
|
||||
|
||||
static void cdfs_determine_sector_size(cdfs_track_t* track)
|
||||
{
|
||||
uint8_t buffer[32];
|
||||
int64_t stream_size;
|
||||
const int toc_sector = track->pregap_sectors + 16;
|
||||
|
||||
/* MODE information is normally found in the CUE sheet, but we can try to determine it from the raw data.
|
||||
*
|
||||
@ -23,23 +28,23 @@ static void cdfs_determine_sector_size(cdfs_file_t* file)
|
||||
*/
|
||||
|
||||
/* The boot record or primary volume descriptor is always at sector 16 and will contain a "CD001" marker */
|
||||
intfstream_seek(file->stream, 16 * 2352, SEEK_SET);
|
||||
if (intfstream_read(file->stream, buffer, sizeof(buffer)) < sizeof(buffer))
|
||||
intfstream_seek(track->stream, toc_sector * 2352, SEEK_SET);
|
||||
if (intfstream_read(track->stream, buffer, sizeof(buffer)) < sizeof(buffer))
|
||||
return;
|
||||
|
||||
/* if this is a CDROM-XA data source, the "CD001" tag will be 25 bytes into the sector */
|
||||
if (buffer[25] == 0x43 && buffer[26] == 0x44 &&
|
||||
buffer[27] == 0x30 && buffer[28] == 0x30 && buffer[29] == 0x31)
|
||||
{
|
||||
file->stream_sector_size = 2352;
|
||||
file->stream_sector_header_size = 24;
|
||||
track->stream_sector_size = 2352;
|
||||
track->stream_sector_header_size = 24;
|
||||
}
|
||||
/* otherwise it should be 17 bytes into the sector */
|
||||
else if (buffer[17] == 0x43 && buffer[18] == 0x44 &&
|
||||
buffer[19] == 0x30 && buffer[20] == 0x30 && buffer[21] == 0x31)
|
||||
{
|
||||
file->stream_sector_size = 2352;
|
||||
file->stream_sector_header_size = 16;
|
||||
track->stream_sector_size = 2352;
|
||||
track->stream_sector_header_size = 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -48,40 +53,56 @@ static void cdfs_determine_sector_size(cdfs_file_t* file)
|
||||
buffer[4] == 0xFF && buffer[5] == 0xFF && buffer[6] == 0xFF && buffer[7] == 0xFF &&
|
||||
buffer[8] == 0xFF && buffer[9] == 0xFF && buffer[10] == 0xFF && buffer[11] == 0)
|
||||
{
|
||||
/* don't actually expect to get here - a properly headered sector should have had the CD001 tag */
|
||||
/* if we didn't find a CD001 tag, this format may predate ISO-9660 */
|
||||
|
||||
/* after the 12 byte sync pattern is three bytes identifying the sector and then one byte for the mode (total 16 bytes) */
|
||||
file->stream_sector_size = 2352;
|
||||
file->stream_sector_header_size = 16;
|
||||
track->stream_sector_size = 2352;
|
||||
track->stream_sector_header_size = 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no recognizable header - attempt to determine sector size from stream size */
|
||||
stream_size = intfstream_get_size(file->stream);
|
||||
stream_size = intfstream_get_size(track->stream);
|
||||
|
||||
if ((stream_size % 2352) == 0)
|
||||
{
|
||||
/* audio tracks use all 2352 bytes without a header */
|
||||
file->stream_sector_size = 2352;
|
||||
track->stream_sector_size = 2352;
|
||||
}
|
||||
else if ((stream_size % 2048) == 0)
|
||||
{
|
||||
/* cooked tracks eliminate all header/footer data */
|
||||
file->stream_sector_size = 2048;
|
||||
track->stream_sector_size = 2048;
|
||||
}
|
||||
else if ((stream_size % 2336) == 0)
|
||||
{
|
||||
/* MODE 2 format without 16-byte sync data */
|
||||
file->stream_sector_size = 2336;
|
||||
file->stream_sector_header_size = 8;
|
||||
track->stream_sector_size = 2336;
|
||||
track->stream_sector_header_size = 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void cdfs_seek_sector(cdfs_file_t* file, unsigned int sector)
|
||||
static void cdfs_seek_track_sector(cdfs_track_t* track, unsigned int sector)
|
||||
{
|
||||
intfstream_seek(file->stream, sector * file->stream_sector_size + file->stream_sector_header_size, SEEK_SET);
|
||||
intfstream_seek(track->stream, (sector + track->pregap_sectors) * track->stream_sector_size + track->stream_sector_header_size, SEEK_SET);
|
||||
}
|
||||
|
||||
void cdfs_seek_sector(cdfs_file_t* file, unsigned int sector)
|
||||
{
|
||||
/* only allowed if open_file was called with a NULL path */
|
||||
if (file->first_sector == 0)
|
||||
{
|
||||
if (sector != file->current_sector)
|
||||
{
|
||||
file->current_sector = sector;
|
||||
file->sector_buffer_valid = 0;
|
||||
}
|
||||
|
||||
file->pos = file->current_sector * 2048;
|
||||
file->current_sector_offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int cdfs_find_file(cdfs_file_t* file, const char* path)
|
||||
@ -108,8 +129,8 @@ static int cdfs_find_file(cdfs_file_t* file, const char* path)
|
||||
int offset;
|
||||
|
||||
/* find the cd information (always 16 frames in) */
|
||||
cdfs_seek_sector(file, 16);
|
||||
intfstream_read(file->stream, buffer, sizeof(buffer));
|
||||
cdfs_seek_track_sector(file->track, 16);
|
||||
intfstream_read(file->track->stream, buffer, sizeof(buffer));
|
||||
|
||||
/* the directory_record starts at 156 bytes into the sector.
|
||||
* the sector containing the root directory contents is a 3 byte value that is 2 bytes into the directory_record. */
|
||||
@ -118,8 +139,8 @@ static int cdfs_find_file(cdfs_file_t* file, const char* path)
|
||||
}
|
||||
|
||||
/* process the contents of the directory */
|
||||
cdfs_seek_sector(file, sector);
|
||||
intfstream_read(file->stream, buffer, sizeof(buffer));
|
||||
cdfs_seek_track_sector(file->track, sector);
|
||||
intfstream_read(file->track->stream, buffer, sizeof(buffer));
|
||||
|
||||
path_length = strlen(path);
|
||||
tmp = buffer;
|
||||
@ -149,25 +170,24 @@ static int cdfs_find_file(cdfs_file_t* file, const char* path)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int cdfs_open_file(cdfs_file_t* file, intfstream_t* stream, const char* path)
|
||||
int cdfs_open_file(cdfs_file_t* file, cdfs_track_t* track, const char* path)
|
||||
{
|
||||
if (!file || !stream)
|
||||
if (!file || !track)
|
||||
return 0;
|
||||
|
||||
memset(file, 0, sizeof(*file));
|
||||
|
||||
file->stream = stream;
|
||||
cdfs_determine_sector_size(file);
|
||||
file->track = track;
|
||||
|
||||
file->current_sector = -1;
|
||||
if (path != NULL)
|
||||
{
|
||||
file->first_sector = cdfs_find_file(file, path);
|
||||
}
|
||||
else if (file->stream_sector_size)
|
||||
else if (file->track->stream_sector_size)
|
||||
{
|
||||
file->first_sector = 0;
|
||||
file->size = (intfstream_get_size(file->stream) / file->stream_sector_size) * 2048;
|
||||
file->size = (intfstream_get_size(file->track->stream) / file->track->stream_sector_size) * 2048;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -222,8 +242,8 @@ int64_t cdfs_read_file(cdfs_file_t* file, void* buffer, uint64_t len)
|
||||
|
||||
while (len >= 2048)
|
||||
{
|
||||
cdfs_seek_sector(file, file->current_sector);
|
||||
intfstream_read(file->stream, buffer, 2048);
|
||||
cdfs_seek_track_sector(file->track, file->current_sector);
|
||||
intfstream_read(file->track->stream, buffer, 2048);
|
||||
|
||||
buffer = (char*)buffer + 2048;
|
||||
bytes_read += 2048;
|
||||
@ -234,8 +254,8 @@ int64_t cdfs_read_file(cdfs_file_t* file, void* buffer, uint64_t len)
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
cdfs_seek_sector(file, file->current_sector);
|
||||
intfstream_read(file->stream, file->sector_buffer, 2048);
|
||||
cdfs_seek_track_sector(file->track, file->current_sector);
|
||||
intfstream_read(file->track->stream, file->sector_buffer, 2048);
|
||||
memcpy(buffer, file->sector_buffer, len);
|
||||
file->current_sector_offset = len;
|
||||
file->sector_buffer_valid = 1;
|
||||
@ -322,7 +342,21 @@ static void cdfs_skip_spaces(const char** ptr)
|
||||
++(*ptr);
|
||||
}
|
||||
|
||||
static intfstream_t* cdfs_open_cue_track(const char* path, unsigned int track_index)
|
||||
static cdfs_track_t* cdfs_wrap_stream(intfstream_t* stream, unsigned pregap_sectors)
|
||||
{
|
||||
cdfs_track_t* track;
|
||||
|
||||
if (stream == NULL)
|
||||
return NULL;
|
||||
|
||||
track = (cdfs_track_t*)calloc(1, sizeof(*track));
|
||||
track->stream = stream;
|
||||
track->pregap_sectors = pregap_sectors;
|
||||
cdfs_determine_sector_size(track);
|
||||
return track;
|
||||
}
|
||||
|
||||
static cdfs_track_t* cdfs_open_cue_track(const char* path, unsigned int track_index)
|
||||
{
|
||||
char* cue_contents = NULL;
|
||||
char* cue = NULL;
|
||||
@ -331,7 +365,9 @@ static intfstream_t* cdfs_open_cue_track(const char* path, unsigned int track_in
|
||||
char current_track_path[PATH_MAX_LENGTH] = {0};
|
||||
char track_path[PATH_MAX_LENGTH] = {0};
|
||||
intfstream_t* cue_stream = NULL;
|
||||
cdfs_track_t* track = NULL;
|
||||
int64_t stream_size = 0;
|
||||
unsigned int pregap_sectors = 0;
|
||||
|
||||
cue_stream = intfstream_open_file(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
|
||||
@ -420,6 +456,14 @@ static intfstream_t* cdfs_open_cue_track(const char* path, unsigned int track_in
|
||||
|
||||
if (index_number == 1)
|
||||
{
|
||||
unsigned min = 0, sec = 0, frame = 0;
|
||||
const char* ptr = index;
|
||||
while (*ptr && *ptr != ' ' && *ptr != '\n')
|
||||
++ptr;
|
||||
cdfs_skip_spaces(&ptr);
|
||||
sscanf(ptr, "%u:%u:%u", &min, &sec, &frame);
|
||||
pregap_sectors = ((min * 60) + sec) * 75 + frame;
|
||||
|
||||
if (strstr(current_track_path, "/") || strstr(current_track_path, "\\"))
|
||||
{
|
||||
strncpy(track_path, current_track_path, sizeof(track_path));
|
||||
@ -441,47 +485,80 @@ static intfstream_t* cdfs_open_cue_track(const char* path, unsigned int track_in
|
||||
if (string_is_empty(track_path))
|
||||
return NULL;
|
||||
|
||||
return intfstream_open_file(track_path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
return cdfs_wrap_stream(intfstream_open_file(track_path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE), pregap_sectors);
|
||||
}
|
||||
|
||||
intfstream_t* cdfs_open_track(const char* path, unsigned int track_index)
|
||||
#ifdef HAVE_CHD
|
||||
static cdfs_track_t* cdfs_open_chd_track(const char* path, int32_t track_index)
|
||||
{
|
||||
intfstream_t* intf_stream;
|
||||
cdfs_track_t* track;
|
||||
unsigned int pregap_sectors;
|
||||
|
||||
intf_stream = intfstream_open_chd_track(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE, track_index);
|
||||
if (!intf_stream)
|
||||
return NULL;
|
||||
|
||||
pregap_sectors = intfstream_get_chd_pregap(intf_stream);
|
||||
|
||||
track = cdfs_wrap_stream(intf_stream, pregap_sectors);
|
||||
|
||||
/* CHD removes the markers from the header, so we can't detect the header size, just assume its 16 bytes */
|
||||
if (track->stream_sector_header_size == 0)
|
||||
track->stream_sector_header_size = 16;
|
||||
return track;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct cdfs_track_t* cdfs_open_track(const char* path, unsigned int track_index)
|
||||
{
|
||||
intfstream_t* stream = NULL;
|
||||
const char* ext = path_get_extension(path);
|
||||
|
||||
if (string_is_equal_noncase(ext, "cue"))
|
||||
return cdfs_open_cue_track(path, track_index);
|
||||
|
||||
#ifdef HAVE_CHD
|
||||
if (string_is_equal_noncase(ext, "chd"))
|
||||
return intfstream_open_chd_track(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE, track_index);
|
||||
return cdfs_open_chd_track(path, track_index);
|
||||
#endif
|
||||
|
||||
/* unsupported file type */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
intfstream_t* cdfs_open_data_track(const char* path)
|
||||
struct cdfs_track_t* cdfs_open_data_track(const char* path)
|
||||
{
|
||||
const char* ext = path_get_extension(path);
|
||||
|
||||
if (string_is_equal_noncase(ext, "cue"))
|
||||
return cdfs_open_cue_track(path, 0);
|
||||
|
||||
#ifdef HAVE_CHD
|
||||
if (string_is_equal_noncase(ext, "chd"))
|
||||
{
|
||||
/* TODO: determine data track */
|
||||
return intfstream_open_chd_track(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE, 1);
|
||||
}
|
||||
return cdfs_open_chd_track(path, CHDSTREAM_TRACK_PRIMARY);
|
||||
#endif
|
||||
|
||||
/* unsupported file type - try opening as a raw track */
|
||||
return cdfs_open_raw_track(path);
|
||||
}
|
||||
|
||||
intfstream_t* cdfs_open_raw_track(const char* path)
|
||||
cdfs_track_t* cdfs_open_raw_track(const char* path)
|
||||
{
|
||||
const char* ext = path_get_extension(path);
|
||||
|
||||
if (string_is_equal_noncase(ext, "bin") || string_is_equal_noncase(ext, "iso"))
|
||||
return intfstream_open_file(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
return cdfs_wrap_stream(intfstream_open_file(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE), 0);
|
||||
|
||||
/* unsupported file type */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void cdfs_close_track(cdfs_track_t* track)
|
||||
{
|
||||
if (track)
|
||||
{
|
||||
intfstream_close(track->stream);
|
||||
free(track);
|
||||
}
|
||||
}
|
||||
|
@ -1682,6 +1682,8 @@ static chd_error hunk_read_into_memory(chd_file *chd, UINT32 hunknum, UINT8 *des
|
||||
bytes = read_compressed(chd, blockoffs, blocklen);
|
||||
if (bytes == NULL)
|
||||
return CHDERR_READ_ERROR;
|
||||
if (!chd->codecintf[rawmap[0]])
|
||||
return CHDERR_UNSUPPORTED_FORMAT;
|
||||
switch (chd->codecintf[rawmap[0]]->compression)
|
||||
{
|
||||
case CHD_CODEC_CD_LZMA:
|
||||
|
@ -31,25 +31,31 @@ RETRO_BEGIN_DECLS
|
||||
* of a CD (following the ISO-9660 directory structure definition)
|
||||
*/
|
||||
|
||||
typedef struct cdfs_track_t
|
||||
{
|
||||
intfstream_t* stream;
|
||||
unsigned int stream_sector_size;
|
||||
unsigned int stream_sector_header_size;
|
||||
unsigned int pregap_sectors;
|
||||
} cdfs_track_t;
|
||||
|
||||
typedef struct cdfs_file_t
|
||||
{
|
||||
int first_sector;
|
||||
int current_sector;
|
||||
unsigned int current_sector_offset;
|
||||
int sector_buffer_valid;
|
||||
unsigned int stream_sector_size;
|
||||
unsigned int stream_sector_header_size;
|
||||
unsigned int size;
|
||||
unsigned int pos;
|
||||
intfstream_t* stream;
|
||||
uint8_t sector_buffer[2048];
|
||||
struct cdfs_track_t* track;
|
||||
} cdfs_file_t;
|
||||
|
||||
/* opens the specified file within the CD or virtual CD.
|
||||
* if path is NULL, will open the raw CD (useful for reading CD without having to worry about sector sizes,
|
||||
* headers, or checksum data)
|
||||
*/
|
||||
int cdfs_open_file(cdfs_file_t* file, intfstream_t* stream, const char* path);
|
||||
int cdfs_open_file(cdfs_file_t* file, cdfs_track_t* stream, const char* path);
|
||||
|
||||
void cdfs_close_file(cdfs_file_t* file);
|
||||
|
||||
@ -61,6 +67,8 @@ int64_t cdfs_tell(cdfs_file_t* file);
|
||||
|
||||
int64_t cdfs_seek(cdfs_file_t* file, int64_t offset, int whence);
|
||||
|
||||
void cdfs_seek_sector(cdfs_file_t* file, unsigned int sector);
|
||||
|
||||
/* opens the specified track in a CD or virtual CD file - the resulting stream should be passed to
|
||||
* cdfs_open_file to get access to a file within the CD.
|
||||
*
|
||||
@ -75,11 +83,11 @@ int64_t cdfs_seek(cdfs_file_t* file, int64_t offset, int whence);
|
||||
* MODE1/2048 - untested
|
||||
* MODE2/2336 - untested
|
||||
*/
|
||||
intfstream_t* cdfs_open_track(const char* path, unsigned int track_index);
|
||||
cdfs_track_t* cdfs_open_track(const char* path, unsigned int track_index);
|
||||
|
||||
/* opens the first data track in a CD or virtual CD file. see cdfs_open_track for supported file formats
|
||||
*/
|
||||
intfstream_t* cdfs_open_data_track(const char* path);
|
||||
cdfs_track_t* cdfs_open_data_track(const char* path);
|
||||
|
||||
/* opens a raw track file for a CD or virtual CD.
|
||||
*
|
||||
@ -89,7 +97,10 @@ intfstream_t* cdfs_open_data_track(const char* path);
|
||||
* bin - path will point to the bin file
|
||||
* iso - path will point to the iso file
|
||||
*/
|
||||
intfstream_t* cdfs_open_raw_track(const char* path);
|
||||
cdfs_track_t* cdfs_open_raw_track(const char* path);
|
||||
|
||||
/* closes the CD or virtual CD track and frees the associated memory */
|
||||
void cdfs_close_track(cdfs_track_t* track);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
@ -1934,6 +1934,10 @@ enum retro_sensor_action
|
||||
{
|
||||
RETRO_SENSOR_ACCELEROMETER_ENABLE = 0,
|
||||
RETRO_SENSOR_ACCELEROMETER_DISABLE,
|
||||
RETRO_SENSOR_GYROSCOPE_ENABLE,
|
||||
RETRO_SENSOR_GYROSCOPE_DISABLE,
|
||||
RETRO_SENSOR_ILLUMINANCE_ENABLE,
|
||||
RETRO_SENSOR_ILLUMINANCE_DISABLE,
|
||||
|
||||
RETRO_SENSOR_DUMMY = INT_MAX
|
||||
};
|
||||
@ -1942,6 +1946,10 @@ enum retro_sensor_action
|
||||
#define RETRO_SENSOR_ACCELEROMETER_X 0
|
||||
#define RETRO_SENSOR_ACCELEROMETER_Y 1
|
||||
#define RETRO_SENSOR_ACCELEROMETER_Z 2
|
||||
#define RETRO_SENSOR_GYROSCOPE_X 3
|
||||
#define RETRO_SENSOR_GYROSCOPE_Y 4
|
||||
#define RETRO_SENSOR_GYROSCOPE_Z 5
|
||||
#define RETRO_SENSOR_ILLUMINANCE 6
|
||||
|
||||
typedef bool (RETRO_CALLCONV *retro_set_sensor_state_t)(unsigned port,
|
||||
enum retro_sensor_action action, unsigned rate);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(__CELLOS_LV2__) || defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH)
|
||||
#if defined(__CELLOS_LV2__) || defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH) || defined(HAVE_LIBNX)
|
||||
/* No mman available */
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
#include <windows.h>
|
||||
|
@ -245,11 +245,25 @@ void *sthread_tls_get(sthread_tls_t *tls);
|
||||
/**
|
||||
* @brief Binds thread specific data to a key
|
||||
* @param tls
|
||||
* @return whether the operation suceeded or not
|
||||
* @return Whether the operation suceeded or not
|
||||
*/
|
||||
bool sthread_tls_set(sthread_tls_t *tls, const void *data);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @brief Get thread ID of specified thread
|
||||
* @param thread
|
||||
* @return The ID of the specified thread
|
||||
*/
|
||||
uintptr_t sthread_get_thread_id(sthread_t *thread);
|
||||
|
||||
/*
|
||||
* @brief Get thread ID of the current thread
|
||||
* @param
|
||||
* @return The ID of the current thread
|
||||
*/
|
||||
uintptr_t sthread_get_current_thread_id(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -57,6 +57,8 @@ int64_t chdstream_seek(chdstream_t *stream, int64_t offset, int whence);
|
||||
|
||||
ssize_t chdstream_get_size(chdstream_t *stream);
|
||||
|
||||
uint32_t chdstream_get_pregap(chdstream_t* stream);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -96,6 +96,8 @@ int64_t intfstream_get_size(intfstream_internal_t *intf);
|
||||
|
||||
int intfstream_flush(intfstream_internal_t *intf);
|
||||
|
||||
uint32_t intfstream_get_chd_pregap(intfstream_internal_t *intf);
|
||||
|
||||
intfstream_t* intfstream_open_file(const char *path,
|
||||
unsigned mode, unsigned hints);
|
||||
|
||||
|
@ -149,12 +149,16 @@ int retro_epoll_fd;
|
||||
#define SOC_ALIGN 0x1000
|
||||
#define SOC_BUFFERSIZE 0x100000
|
||||
static u32* _net_compat_net_memory;
|
||||
#elif defined(_WIN32)
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
int inet_aton(const char *cp, struct in_addr *inp)
|
||||
{
|
||||
uint32_t addr = 0;
|
||||
#ifndef _XBOX
|
||||
if (cp == 0 || inp == 0)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
addr = inet_addr(cp);
|
||||
if (addr == INADDR_NONE || addr == INADDR_ANY)
|
||||
@ -387,13 +391,6 @@ uint16_t inet_htons(uint16_t hostshort)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _XBOX
|
||||
static int inet_aton(const char *cp, struct in_addr *addr)
|
||||
{
|
||||
addr->s_addr = inet_addr(cp);
|
||||
return (addr->s_addr == INADDR_NONE) ? 0 : 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int inet_ptrton(int af, const char *src, void *dst)
|
||||
{
|
||||
|
@ -20,7 +20,13 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <compat/msvc.h>
|
||||
#endif
|
||||
|
||||
#include <net/net_compat.h>
|
||||
#include <net/net_socket.h>
|
||||
|
||||
|
@ -940,3 +940,19 @@ bool sthread_tls_set(sthread_tls_t *tls, const void *data)
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
uintptr_t sthread_get_thread_id(sthread_t *thread)
|
||||
{
|
||||
if (!thread)
|
||||
return 0;
|
||||
return (uintptr_t)thread->id;
|
||||
}
|
||||
|
||||
uintptr_t sthread_get_current_thread_id(void)
|
||||
{
|
||||
#ifdef USE_WIN32_THREADS
|
||||
return (uintptr_t)GetCurrentThreadId();
|
||||
#else
|
||||
return (uintptr_t)pthread_self();
|
||||
#endif
|
||||
}
|
||||
|
@ -426,5 +426,22 @@ int64_t chdstream_seek(chdstream_t *stream, int64_t offset, int whence)
|
||||
|
||||
ssize_t chdstream_get_size(chdstream_t *stream)
|
||||
{
|
||||
return stream->track_end;
|
||||
return stream->track_end;
|
||||
}
|
||||
|
||||
uint32_t chdstream_get_pregap(chdstream_t *stream)
|
||||
{
|
||||
metadata_t meta;
|
||||
uint32_t frame_offset = 0;
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; chdstream_get_meta(stream->chd, i, &meta); ++i)
|
||||
{
|
||||
if (stream->track_frame == frame_offset)
|
||||
return meta.pregap;
|
||||
|
||||
frame_offset += meta.frames + meta.extra;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -421,6 +421,16 @@ void intfstream_putc(intfstream_internal_t *intf, int c)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t intfstream_get_chd_pregap(intfstream_internal_t *intf)
|
||||
{
|
||||
#ifdef HAVE_CHD
|
||||
if (intf->type == INTFSTREAM_CHD)
|
||||
return chdstream_get_pregap(intf->chd.fp);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
intfstream_t* intfstream_open_file(const char *path,
|
||||
unsigned mode, unsigned hints)
|
||||
{
|
||||
|
@ -129,6 +129,7 @@ default_sublabel_macro(action_bind_sublabel_logging_settings_list, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_user_interface_settings_list, MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS)
|
||||
default_sublabel_macro(action_bind_sublabel_ai_service_settings_list, MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS)
|
||||
default_sublabel_macro(action_bind_sublabel_ai_service_mode, MENU_ENUM_SUBLABEL_AI_SERVICE_MODE)
|
||||
default_sublabel_macro(action_bind_sublabel_ai_service_pause, MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE)
|
||||
default_sublabel_macro(action_bind_sublabel_ai_service_target_lang, MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG)
|
||||
default_sublabel_macro(action_bind_sublabel_ai_service_source_lang, MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG)
|
||||
default_sublabel_macro(action_bind_sublabel_ai_service_url, MENU_ENUM_SUBLABEL_AI_SERVICE_URL)
|
||||
@ -197,6 +198,8 @@ default_sublabel_macro(action_bind_sublabel_netplay_settings, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_user_bind_settings, MENU_ENUM_SUBLABEL_INPUT_USER_BINDS)
|
||||
default_sublabel_macro(action_bind_sublabel_input_hotkey_settings, MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS)
|
||||
default_sublabel_macro(action_bind_sublabel_materialui_icons_enable, MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_materialui_optimize_landscape_layout, MENU_ENUM_SUBLABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT)
|
||||
default_sublabel_macro(action_bind_sublabel_materialui_auto_rotate_nav_bar, MENU_ENUM_SUBLABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR)
|
||||
default_sublabel_macro(action_bind_sublabel_add_content_list, MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST)
|
||||
default_sublabel_macro(action_bind_sublabel_video_frame_delay, MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY)
|
||||
default_sublabel_macro(action_bind_sublabel_video_shader_delay, MENU_ENUM_SUBLABEL_VIDEO_SHADER_DELAY)
|
||||
@ -217,6 +220,7 @@ default_sublabel_macro(action_bind_sublabel_config_save_on_exit, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_configuration_settings_list, MENU_ENUM_SUBLABEL_CONFIGURATION_SETTINGS)
|
||||
default_sublabel_macro(action_bind_sublabel_configurations_list_list, MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST)
|
||||
default_sublabel_macro(action_bind_sublabel_video_shared_context, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT)
|
||||
default_sublabel_macro(action_bind_sublabel_driver_switch_enable, MENU_ENUM_SUBLABEL_DRIVER_SWITCH_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_latency, MENU_ENUM_SUBLABEL_AUDIO_LATENCY)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_rate_control_delta, MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_mute, MENU_ENUM_SUBLABEL_AUDIO_MUTE)
|
||||
@ -484,6 +488,7 @@ default_sublabel_macro(action_bind_sublabel_xmb_shadows_enable,
|
||||
default_sublabel_macro(action_bind_sublabel_xmb_vertical_thumbnails, MENU_ENUM_SUBLABEL_XMB_VERTICAL_THUMBNAILS)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_xmb_thumbnail_scale_factor, MENU_ENUM_SUBLABEL_MENU_XMB_THUMBNAIL_SCALE_FACTOR)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_color_theme, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME)
|
||||
default_sublabel_macro(action_bind_sublabel_materialui_menu_transition_animation, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_TRANSITION_ANIMATION)
|
||||
default_sublabel_macro(action_bind_sublabel_ozone_menu_color_theme, MENU_ENUM_SUBLABEL_OZONE_MENU_COLOR_THEME)
|
||||
default_sublabel_macro(action_bind_sublabel_ozone_collapse_sidebar, MENU_ENUM_SUBLABEL_OZONE_COLLAPSE_SIDEBAR)
|
||||
default_sublabel_macro(action_bind_sublabel_ozone_truncate_playlist_name, MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME)
|
||||
@ -1247,6 +1252,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_materialui_icons_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_materialui_optimize_landscape_layout);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_materialui_auto_rotate_nav_bar);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_viewport_custom_height);
|
||||
break;
|
||||
@ -1707,6 +1718,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_color_theme);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MATERIALUI_MENU_TRANSITION_ANIMATION:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_materialui_menu_transition_animation);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_xmb_shadows_enable);
|
||||
break;
|
||||
@ -2467,6 +2481,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_AUDIO_LATENCY:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_latency);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_DRIVER_SWITCH_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_driver_switch_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_shared_context);
|
||||
break;
|
||||
@ -2714,6 +2731,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_AI_SERVICE_MODE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ai_service_mode);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_AI_SERVICE_PAUSE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ai_service_pause);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_AI_SERVICE_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ai_service_enable);
|
||||
break;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -147,8 +147,10 @@ menu_display_gl_discard_draw_rectangle(menu_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info
|
||||
)
|
||||
{
|
||||
static bool mali_4xx_detected = false;
|
||||
static bool scissor_inited = false;
|
||||
static bool mali_4xx_detected = false;
|
||||
static bool scissor_inited = false;
|
||||
static unsigned last_video_width = 0;
|
||||
static unsigned last_video_height = 0;
|
||||
|
||||
if (!scissor_inited)
|
||||
{
|
||||
@ -156,12 +158,11 @@ menu_display_gl_discard_draw_rectangle(menu_display_ctx_draw_t *draw,
|
||||
const char *gpu_device_string = NULL;
|
||||
scissor_inited = true;
|
||||
|
||||
if ((scx0 + scx1 + scy0 + scy1) == 0)
|
||||
scissor_set_rectangle(0,
|
||||
video_info->width - 1,
|
||||
0,
|
||||
video_info->height - 1,
|
||||
0);
|
||||
scissor_set_rectangle(0,
|
||||
video_info->width - 1,
|
||||
0,
|
||||
video_info->height - 1,
|
||||
0);
|
||||
|
||||
/* TODO/FIXME - This might be thread unsafe in the long run -
|
||||
* preferably call this once outside of the menu display driver
|
||||
@ -181,20 +182,39 @@ menu_display_gl_discard_draw_rectangle(menu_display_ctx_draw_t *draw,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
last_video_width = video_info->width;
|
||||
last_video_height = video_info->height;
|
||||
}
|
||||
|
||||
/* discards not only out-of-bounds scissoring,
|
||||
/* Early out, to minimise performance impact on
|
||||
* non-mali_4xx devices */
|
||||
if (!mali_4xx_detected)
|
||||
return false;
|
||||
|
||||
/* Have to update scissor_set_rectangle() if the
|
||||
* video dimensions change */
|
||||
if ((video_info->width != last_video_width) ||
|
||||
(video_info->height != last_video_height))
|
||||
{
|
||||
scissor_set_rectangle(0,
|
||||
video_info->width - 1,
|
||||
0,
|
||||
video_info->height - 1,
|
||||
0);
|
||||
|
||||
last_video_width = video_info->width;
|
||||
last_video_height = video_info->height;
|
||||
}
|
||||
|
||||
/* Discards not only out-of-bounds scissoring,
|
||||
* but also out-of-view draws.
|
||||
*
|
||||
* This is intentional.
|
||||
*/
|
||||
if (mali_4xx_detected &&
|
||||
scissor_is_outside_rectangle(
|
||||
draw->x, draw->x + draw->width - 1,
|
||||
draw->y, draw->y + draw->height - 1))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return scissor_is_outside_rectangle(
|
||||
draw->x, draw->x + draw->width - 1,
|
||||
draw->y, draw->y + draw->height - 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -154,9 +154,29 @@ enum materialui_color_theme
|
||||
MATERIALUI_THEME_MATERIALUI,
|
||||
MATERIALUI_THEME_MATERIALUI_DARK,
|
||||
MATERIALUI_THEME_OZONE_DARK,
|
||||
MATERIALUI_THEME_NORD,
|
||||
MATERIALUI_THEME_GRUVBOX_DARK,
|
||||
MATERIALUI_THEME_SOLARIZED_DARK,
|
||||
MATERIALUI_THEME_CUTIE_BLUE,
|
||||
MATERIALUI_THEME_CUTIE_CYAN,
|
||||
MATERIALUI_THEME_CUTIE_GREEN,
|
||||
MATERIALUI_THEME_CUTIE_ORANGE,
|
||||
MATERIALUI_THEME_CUTIE_PINK,
|
||||
MATERIALUI_THEME_CUTIE_PURPLE,
|
||||
MATERIALUI_THEME_CUTIE_RED,
|
||||
MATERIALUI_THEME_VIRTUAL_BOY,
|
||||
MATERIALUI_THEME_LAST
|
||||
};
|
||||
|
||||
enum materialui_transition_animation
|
||||
{
|
||||
MATERIALUI_TRANSITION_ANIM_AUTO = 0,
|
||||
MATERIALUI_TRANSITION_ANIM_FADE,
|
||||
MATERIALUI_TRANSITION_ANIM_SLIDE,
|
||||
MATERIALUI_TRANSITION_ANIM_NONE,
|
||||
MATERIALUI_TRANSITION_ANIM_LAST
|
||||
};
|
||||
|
||||
enum xmb_color_theme
|
||||
{
|
||||
XMB_THEME_LEGACY_RED = 0,
|
||||
|
@ -3827,6 +3827,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
{MENU_ENUM_LABEL_AI_SERVICE_MODE, PARSE_ONLY_UINT, true },
|
||||
{MENU_ENUM_LABEL_AI_SERVICE_URL, PARSE_ONLY_STRING, true },
|
||||
{MENU_ENUM_LABEL_AI_SERVICE_ENABLE, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_AI_SERVICE_PAUSE, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_AI_SERVICE_SOURCE_LANG, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_AI_SERVICE_TARGET_LANG, PARSE_ONLY_UINT, true},
|
||||
};
|
||||
@ -5225,6 +5226,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
{
|
||||
menu_displaylist_build_info_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_DRIVER_SWITCH_ENABLE, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_VIDEO_ALLOW_ROTATE, PARSE_ONLY_BOOL},
|
||||
@ -5444,7 +5446,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
{MENU_ENUM_LABEL_OZONE_COLLAPSE_SIDEBAR, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME, PARSE_ONLY_UINT},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_MENU_TRANSITION_ANIMATION, PARSE_ONLY_UINT},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_MENU_HEADER_OPACITY, PARSE_ONLY_FLOAT},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_MENU_FOOTER_OPACITY, PARSE_ONLY_FLOAT},
|
||||
{MENU_ENUM_LABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, PARSE_ONLY_BOOL },
|
||||
|
@ -2284,10 +2284,24 @@ void menu_display_draw(menu_display_ctx_draw_t *draw,
|
||||
return;
|
||||
if (draw->width <= 0)
|
||||
return;
|
||||
|
||||
menu_disp->draw(draw, video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw_blend(menu_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (!menu_disp || !draw || !menu_disp->draw)
|
||||
return;
|
||||
|
||||
if (draw->height <= 0)
|
||||
return;
|
||||
if (draw->width <= 0)
|
||||
return;
|
||||
menu_display_blend_begin(video_info);
|
||||
menu_disp->draw(draw, video_info);
|
||||
menu_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
@ -3185,6 +3199,35 @@ bool menu_display_reset_textures_list(
|
||||
}
|
||||
|
||||
|
||||
bool menu_display_reset_textures_list_buffer(
|
||||
uintptr_t *item, enum texture_filter_type filter_type,
|
||||
void* buffer, unsigned buffer_len, enum image_type_enum image_type,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
struct texture_image ti;
|
||||
|
||||
ti.width = 0;
|
||||
ti.height = 0;
|
||||
ti.pixels = NULL;
|
||||
ti.supports_rgba = video_driver_supports_rgba();
|
||||
|
||||
if (!image_texture_load_buffer(&ti, image_type, buffer, buffer_len))
|
||||
return false;
|
||||
|
||||
if (width)
|
||||
*width = ti.width;
|
||||
|
||||
if (height)
|
||||
*height = ti.height;
|
||||
|
||||
/* if the poke interface doesn't support texture load then return false */
|
||||
if (!video_driver_texture_load(&ti, filter_type, item))
|
||||
return false;
|
||||
image_texture_free(&ti);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* menu_driver_find_handle:
|
||||
* @idx : index of driver to get handle to.
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <gfx/math/matrix_4x4.h>
|
||||
#include <formats/image.h>
|
||||
#include <queues/task_queue.h>
|
||||
|
||||
#include "menu_defines.h"
|
||||
@ -583,6 +584,8 @@ void menu_display_clear_color(menu_display_ctx_clearcolor_t *color,
|
||||
video_frame_info_t *video_info);
|
||||
void menu_display_draw(menu_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
void menu_display_draw_blend(menu_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
void menu_display_draw_keyboard(
|
||||
uintptr_t hover_texture,
|
||||
const font_data_t *font,
|
||||
@ -680,6 +683,11 @@ bool menu_display_reset_textures_list(
|
||||
uintptr_t *item, enum texture_filter_type filter_type,
|
||||
unsigned *width, unsigned *height);
|
||||
|
||||
bool menu_display_reset_textures_list_buffer(
|
||||
uintptr_t *item, enum texture_filter_type filter_type,
|
||||
void* buffer, unsigned buffer_len, enum image_type_enum image_type,
|
||||
unsigned *width, unsigned *height);
|
||||
|
||||
/* Returns the OSK key at a given position */
|
||||
int menu_display_osk_ptr_at_pos(void *data, int x, int y,
|
||||
unsigned width, unsigned height);
|
||||
|
@ -3868,6 +3868,95 @@ static void setting_get_string_representation_uint_materialui_menu_color_theme(
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_OZONE_DARK), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_NORD:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_NORD), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_GRUVBOX_DARK:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_GRUVBOX_DARK), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_SOLARIZED_DARK:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_SOLARIZED_DARK), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_CUTIE_BLUE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_BLUE), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_CUTIE_CYAN:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_CYAN), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_CUTIE_GREEN:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_GREEN), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_CUTIE_ORANGE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_ORANGE), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_CUTIE_PINK:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_PINK), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_CUTIE_PURPLE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_PURPLE), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_CUTIE_RED:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_RED), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_VIRTUAL_BOY:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_VIRTUAL_BOY), len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_uint_materialui_menu_transition_animation(
|
||||
rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
if (!setting)
|
||||
return;
|
||||
|
||||
switch (*setting->value.target.unsigned_integer)
|
||||
{
|
||||
case MATERIALUI_TRANSITION_ANIM_AUTO:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_AUTO), len);
|
||||
break;
|
||||
case MATERIALUI_TRANSITION_ANIM_FADE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_FADE), len);
|
||||
break;
|
||||
case MATERIALUI_TRANSITION_ANIM_SLIDE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_SLIDE), len);
|
||||
break;
|
||||
case MATERIALUI_TRANSITION_ANIM_NONE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_NONE), len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -7822,8 +7911,8 @@ static bool setting_append_list(
|
||||
break;
|
||||
case SETTINGS_LIST_CORE:
|
||||
{
|
||||
unsigned i;
|
||||
struct bool_entry bool_entries[5];
|
||||
unsigned i, listing = 0;
|
||||
struct bool_entry bool_entries[6];
|
||||
|
||||
START_GROUP(list, list_info, &group_info,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS), parent_group);
|
||||
@ -7836,35 +7925,47 @@ static bool setting_append_list(
|
||||
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
|
||||
parent_group);
|
||||
|
||||
bool_entries[0].target = &settings->bools.video_shared_context;
|
||||
bool_entries[0].name_enum_idx = MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT;
|
||||
bool_entries[0].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_SHARED_CONTEXT;
|
||||
bool_entries[0].default_value = DEFAULT_VIDEO_SHARED_CONTEXT;
|
||||
bool_entries[0].flags = SD_FLAG_ADVANCED;
|
||||
bool_entries[listing].target = &settings->bools.video_shared_context;
|
||||
bool_entries[listing].name_enum_idx = MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT;
|
||||
bool_entries[listing].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_SHARED_CONTEXT;
|
||||
bool_entries[listing].default_value = DEFAULT_VIDEO_SHARED_CONTEXT;
|
||||
bool_entries[listing].flags = SD_FLAG_ADVANCED;
|
||||
listing++;
|
||||
|
||||
bool_entries[1].target = &settings->bools.load_dummy_on_core_shutdown;
|
||||
bool_entries[1].name_enum_idx = MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN;
|
||||
bool_entries[1].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN;
|
||||
bool_entries[1].default_value = DEFAULT_LOAD_DUMMY_ON_CORE_SHUTDOWN;
|
||||
bool_entries[1].flags = SD_FLAG_ADVANCED;
|
||||
bool_entries[listing].target = &settings->bools.driver_switch_enable;
|
||||
bool_entries[listing].name_enum_idx = MENU_ENUM_LABEL_DRIVER_SWITCH_ENABLE;
|
||||
bool_entries[listing].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_DRIVER_SWITCH_ENABLE;
|
||||
bool_entries[listing].default_value = DEFAULT_DRIVER_SWITCH_ENABLE;
|
||||
bool_entries[listing].flags = SD_FLAG_ADVANCED;
|
||||
listing++;
|
||||
|
||||
bool_entries[2].target = &settings->bools.set_supports_no_game_enable;
|
||||
bool_entries[2].name_enum_idx = MENU_ENUM_LABEL_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE;
|
||||
bool_entries[2].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE;
|
||||
bool_entries[2].default_value = true;
|
||||
bool_entries[2].flags = SD_FLAG_ADVANCED;
|
||||
bool_entries[listing].target = &settings->bools.load_dummy_on_core_shutdown;
|
||||
bool_entries[listing].name_enum_idx = MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN;
|
||||
bool_entries[listing].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN;
|
||||
bool_entries[listing].default_value = DEFAULT_LOAD_DUMMY_ON_CORE_SHUTDOWN;
|
||||
bool_entries[listing].flags = SD_FLAG_ADVANCED;
|
||||
listing++;
|
||||
|
||||
bool_entries[3].target = &settings->bools.check_firmware_before_loading;
|
||||
bool_entries[3].name_enum_idx = MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE;
|
||||
bool_entries[3].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CHECK_FOR_MISSING_FIRMWARE;
|
||||
bool_entries[3].default_value = true;
|
||||
bool_entries[3].flags = SD_FLAG_ADVANCED;
|
||||
bool_entries[listing].target = &settings->bools.set_supports_no_game_enable;
|
||||
bool_entries[listing].name_enum_idx = MENU_ENUM_LABEL_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE;
|
||||
bool_entries[listing].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE;
|
||||
bool_entries[listing].default_value = true;
|
||||
bool_entries[listing].flags = SD_FLAG_ADVANCED;
|
||||
listing++;
|
||||
|
||||
bool_entries[4].target = &settings->bools.video_allow_rotate;
|
||||
bool_entries[4].name_enum_idx = MENU_ENUM_LABEL_VIDEO_ALLOW_ROTATE;
|
||||
bool_entries[4].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE;
|
||||
bool_entries[4].default_value = DEFAULT_ALLOW_ROTATE;
|
||||
bool_entries[4].flags = SD_FLAG_ADVANCED;
|
||||
bool_entries[listing].target = &settings->bools.check_firmware_before_loading;
|
||||
bool_entries[listing].name_enum_idx = MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE;
|
||||
bool_entries[listing].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CHECK_FOR_MISSING_FIRMWARE;
|
||||
bool_entries[listing].default_value = true;
|
||||
bool_entries[listing].flags = SD_FLAG_ADVANCED;
|
||||
listing++;
|
||||
|
||||
bool_entries[listing].target = &settings->bools.video_allow_rotate;
|
||||
bool_entries[listing].name_enum_idx = MENU_ENUM_LABEL_VIDEO_ALLOW_ROTATE;
|
||||
bool_entries[listing].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE;
|
||||
bool_entries[listing].default_value = DEFAULT_ALLOW_ROTATE;
|
||||
bool_entries[listing].flags = SD_FLAG_ADVANCED;
|
||||
listing++;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(bool_entries); i++)
|
||||
{
|
||||
@ -12858,7 +12959,7 @@ static bool setting_append_list(
|
||||
&settings->uints.menu_materialui_color_theme,
|
||||
MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME,
|
||||
MATERIALUI_THEME_BLUE,
|
||||
DEFAULT_MATERIALUI_THEME,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
@ -12870,6 +12971,53 @@ static bool setting_append_list(
|
||||
menu_settings_list_current_add_range(list, list_info, 0, MATERIALUI_THEME_LAST-1, 1, true, true);
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.menu_materialui_transition_animation,
|
||||
MENU_ENUM_LABEL_MATERIALUI_MENU_TRANSITION_ANIMATION,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIMATION,
|
||||
DEFAULT_MATERIALUI_TRANSITION_ANIM,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_uint_materialui_menu_transition_animation;
|
||||
menu_settings_list_current_add_range(list, list_info, 0, MATERIALUI_TRANSITION_ANIM_LAST-1, 1, true, true);
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.menu_materialui_optimize_landscape_layout,
|
||||
MENU_ENUM_LABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT,
|
||||
DEFAULT_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.menu_materialui_auto_rotate_nav_bar,
|
||||
MENU_ENUM_LABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR,
|
||||
DEFAULT_MATERIALUI_AUTO_ROTATE_NAV_BAR,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
/* TODO: These should be removed entirely, but just
|
||||
* comment out for now in case users complain...
|
||||
CONFIG_FLOAT(
|
||||
@ -13412,6 +13560,21 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.ai_service_pause,
|
||||
MENU_ENUM_LABEL_AI_SERVICE_PAUSE,
|
||||
MENU_ENUM_LABEL_VALUE_AI_SERVICE_PAUSE,
|
||||
DEFAULT_AI_SERVICE_PAUSE,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.ai_service_source_lang,
|
||||
|
@ -261,6 +261,12 @@ static menu_timer_t screenshot_timer;
|
||||
|
||||
static unsigned screenshot_shotname_length;
|
||||
|
||||
/* AI Service Overlay */
|
||||
static int ai_service_overlay_state = 0;
|
||||
static unsigned ai_service_overlay_width = 0;
|
||||
static unsigned ai_service_overlay_height = 0;
|
||||
static menu_texture_item ai_service_overlay_texture = 0;
|
||||
|
||||
/* Generic message */
|
||||
static menu_timer_t generic_message_timer;
|
||||
static float generic_message_alpha = 0.0f;
|
||||
@ -709,6 +715,55 @@ static void menu_widgets_draw_icon(
|
||||
menu_display_draw(&draw, video_info);
|
||||
}
|
||||
|
||||
|
||||
static void menu_widgets_draw_icon_blend(
|
||||
video_frame_info_t *video_info,
|
||||
unsigned icon_width,
|
||||
unsigned icon_height,
|
||||
uintptr_t texture,
|
||||
float x, float y,
|
||||
unsigned width, unsigned height,
|
||||
float rotation, float scale_factor,
|
||||
float *color)
|
||||
{
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
menu_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
math_matrix_4x4 mymat;
|
||||
|
||||
if (!texture)
|
||||
return;
|
||||
|
||||
rotate_draw.matrix = &mymat;
|
||||
rotate_draw.rotation = rotation;
|
||||
rotate_draw.scale_x = scale_factor;
|
||||
rotate_draw.scale_y = scale_factor;
|
||||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
coords.vertices = 4;
|
||||
coords.vertex = NULL;
|
||||
coords.tex_coord = NULL;
|
||||
coords.lut_tex_coord = NULL;
|
||||
coords.color = color;
|
||||
|
||||
draw.x = x;
|
||||
draw.y = height - y - icon_height;
|
||||
draw.width = icon_width;
|
||||
draw.height = icon_height;
|
||||
draw.scale_factor = scale_factor;
|
||||
draw.rotation = rotation;
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_draw_blend(&draw, video_info);
|
||||
}
|
||||
|
||||
static float menu_widgets_get_thumbnail_scale_factor(const float dst_width, const float dst_height,
|
||||
const float image_width, const float image_height)
|
||||
{
|
||||
@ -1134,7 +1189,6 @@ static void menu_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_in
|
||||
(msg_queue_scissor_start_x + msg->width - simple_widget_padding*2) * msg->unfold, video_info->height);
|
||||
}
|
||||
|
||||
|
||||
if (msg_queue_has_icons)
|
||||
{
|
||||
menu_display_blend_begin(video_info);
|
||||
@ -1286,6 +1340,57 @@ void menu_widgets_frame(video_frame_info_t *video_info)
|
||||
font_raster_regular.carr.coords.vertices = 0;
|
||||
font_raster_bold.carr.coords.vertices = 0;
|
||||
|
||||
/* AI Service overlay */
|
||||
if (ai_service_overlay_state > 0)
|
||||
{
|
||||
float outline_color[16] = {
|
||||
0.00, 1.00, 0.00, 1.00,
|
||||
0.00, 1.00, 0.00, 1.00,
|
||||
0.00, 1.00, 0.00, 1.00,
|
||||
0.00, 1.00, 0.00, 1.00,
|
||||
};
|
||||
|
||||
menu_widgets_draw_icon_blend(video_info,
|
||||
video_info->width, video_info->height,
|
||||
ai_service_overlay_texture,
|
||||
0, 0,
|
||||
video_info->width, video_info->height,
|
||||
0, 1, menu_widgets_pure_white
|
||||
);
|
||||
/* top line */
|
||||
menu_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
video_info->width, 1,
|
||||
video_info->width, video_info->height,
|
||||
outline_color
|
||||
);
|
||||
/* bottom line */
|
||||
menu_display_draw_quad(video_info,
|
||||
0, video_info->height-1,
|
||||
video_info->width, 1,
|
||||
video_info->width, video_info->height,
|
||||
outline_color
|
||||
);
|
||||
/* left line */
|
||||
menu_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
1, video_info->height,
|
||||
video_info->width, video_info->height,
|
||||
outline_color
|
||||
);
|
||||
/* right line */
|
||||
menu_display_draw_quad(video_info,
|
||||
video_info->width-1, 0,
|
||||
1, video_info->height,
|
||||
video_info->width, video_info->height,
|
||||
outline_color
|
||||
);
|
||||
|
||||
if (ai_service_overlay_state == 2)
|
||||
ai_service_overlay_state = 3;
|
||||
}
|
||||
|
||||
|
||||
/* Libretro message */
|
||||
if (libretro_message_alpha > 0.0f)
|
||||
{
|
||||
@ -1957,6 +2062,9 @@ void menu_widgets_free(void)
|
||||
menu_timer_kill(&libretro_message_timer);
|
||||
menu_animation_kill_by_tag(&libretro_tag);
|
||||
|
||||
/* AI Service overlay */
|
||||
/* ... */
|
||||
|
||||
/* Volume */
|
||||
volume_alpha = 0.0f;
|
||||
|
||||
@ -2014,6 +2122,46 @@ bool menu_widgets_set_fps_text(const char *new_fps_text)
|
||||
return true;
|
||||
}
|
||||
|
||||
int menu_widgets_ai_service_overlay_get_state()
|
||||
{
|
||||
return ai_service_overlay_state;
|
||||
}
|
||||
|
||||
bool menu_widgets_ai_service_overlay_set_state(int state)
|
||||
{
|
||||
ai_service_overlay_state = state;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool menu_widgets_ai_service_overlay_load(
|
||||
char* buffer, unsigned buffer_len, enum image_type_enum image_type)
|
||||
{
|
||||
if (ai_service_overlay_state == 0)
|
||||
{
|
||||
bool res;
|
||||
res = menu_display_reset_textures_list_buffer(
|
||||
&ai_service_overlay_texture,
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR,
|
||||
(void *) buffer, buffer_len, image_type,
|
||||
&ai_service_overlay_width, &ai_service_overlay_height);
|
||||
if (res)
|
||||
ai_service_overlay_state = 1;
|
||||
return res;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void menu_widgets_ai_service_overlay_unload()
|
||||
{
|
||||
if (ai_service_overlay_state == 1)
|
||||
{
|
||||
video_driver_texture_unload(&ai_service_overlay_texture);
|
||||
ai_service_overlay_state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_widgets_screenshot_fadeout(void *userdata)
|
||||
{
|
||||
menu_animation_ctx_entry_t entry;
|
||||
|
@ -55,6 +55,15 @@ void menu_widgets_iterate(unsigned width, unsigned height);
|
||||
|
||||
void menu_widgets_screenshot_taken(const char *shotname, const char *filename);
|
||||
|
||||
/* AI Service functions */
|
||||
int menu_widgets_ai_service_overlay_get_state();
|
||||
bool menu_widgets_ai_service_overlay_set_state(int state);
|
||||
|
||||
bool menu_widgets_ai_service_overlay_load(
|
||||
char* buffer, unsigned buffer_len, enum image_type_enum image_type);
|
||||
void menu_widgets_ai_service_overlay_unload();
|
||||
|
||||
|
||||
void menu_widgets_start_load_content_animation(const char *content_name, bool remove_extension);
|
||||
|
||||
void menu_widgets_cleanup_load_content_animation(void);
|
||||
|
21
msg_hash.h
21
msg_hash.h
@ -517,6 +517,8 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_VALUE_AUTO,
|
||||
|
||||
MENU_LABEL(MATERIALUI_ICONS_ENABLE),
|
||||
MENU_LABEL(MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT),
|
||||
MENU_LABEL(MATERIALUI_AUTO_ROTATE_NAV_BAR),
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED,
|
||||
@ -603,6 +605,23 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_MATERIALUI,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_MATERIALUI_DARK,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_OZONE_DARK,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_NORD,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_GRUVBOX_DARK,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_SOLARIZED_DARK,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_BLUE,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_CYAN,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_GREEN,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_ORANGE,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_PINK,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_PURPLE,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_RED,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_VIRTUAL_BOY,
|
||||
|
||||
MENU_LABEL(MATERIALUI_MENU_TRANSITION_ANIMATION),
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_AUTO,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_FADE,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_SLIDE,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_NONE,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_LATE,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_NORMAL,
|
||||
@ -867,6 +886,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(VIDEO_GAMMA),
|
||||
MENU_LABEL(VIDEO_ALLOW_ROTATE),
|
||||
MENU_LABEL(VIDEO_SHARED_CONTEXT),
|
||||
MENU_LABEL(DRIVER_SWITCH_ENABLE),
|
||||
MENU_LABEL(VIDEO_THREADED),
|
||||
|
||||
MENU_LABEL(VIDEO_SWAP_INTERVAL),
|
||||
@ -1720,6 +1740,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(AI_SERVICE_SOURCE_LANG),
|
||||
MENU_LABEL(AI_SERVICE_URL),
|
||||
MENU_LABEL(AI_SERVICE_ENABLE),
|
||||
MENU_LABEL(AI_SERVICE_PAUSE),
|
||||
|
||||
MENU_LABEL(ON),
|
||||
MENU_LABEL(OFF),
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!-- <!DOCTYPE manifest [ <!ENTITY % versionDTD SYSTEM "../../../version.dtd"> %versionDTD; ]> !-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.retroarch.legacy"
|
||||
android:versionCode="1556806344"
|
||||
android:versionCode="1556806345"
|
||||
android:versionName="1.7.9"
|
||||
android:installLocation="internalOnly">
|
||||
<uses-feature android:glEsVersion="0x00020000" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.retroarch"
|
||||
android:versionCode="1556806345"
|
||||
android:versionCode="1556806346"
|
||||
android:versionName="1.7.9"
|
||||
android:installLocation="internalOnly">
|
||||
<uses-feature android:glEsVersion="0x00020000" />
|
||||
|
526
retroarch.c
526
retroarch.c
@ -2730,11 +2730,10 @@ static void handle_translation_cb(
|
||||
int i = 0;
|
||||
int start = -1;
|
||||
char* found_string = NULL;
|
||||
char* error_string = NULL;
|
||||
int curr_state = 0;
|
||||
|
||||
if (!is_paused && settings->uints.ai_service_mode != 1)
|
||||
goto finish;
|
||||
|
||||
RARCH_LOG("RESULT FROM AI SERVICE...\n");
|
||||
if (!data || error)
|
||||
goto finish;
|
||||
|
||||
@ -2762,38 +2761,63 @@ static void handle_translation_cb(
|
||||
|
||||
if (curr_state == 1)/*image*/
|
||||
{
|
||||
raw_image_file_data = (char*)unbase64(found_string,
|
||||
raw_image_file_data = (char*)unbase64(found_string,
|
||||
strlen(found_string),
|
||||
&new_image_size);
|
||||
curr_state = 0;
|
||||
curr_state = 0;
|
||||
}
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
else if (curr_state == 2)
|
||||
{
|
||||
raw_sound_data = (void*)unbase64(found_string,
|
||||
raw_sound_data = (void*)unbase64(found_string,
|
||||
strlen(found_string), &new_sound_size);
|
||||
curr_state = 0;
|
||||
curr_state = 0;
|
||||
}
|
||||
#endif
|
||||
else if (curr_state == 3)
|
||||
{
|
||||
error_string = (char*)malloc(i-start+1);
|
||||
strlcpy(error_string, body_copy+start+1, i-start);
|
||||
curr_state = 0;
|
||||
}
|
||||
else if (string_is_equal(found_string, "image"))
|
||||
{
|
||||
curr_state = 1;
|
||||
free(found_string);
|
||||
curr_state = 1;
|
||||
free(found_string);
|
||||
}
|
||||
else if (string_is_equal(found_string, "sound"))
|
||||
{
|
||||
curr_state = 2;
|
||||
free(found_string);
|
||||
curr_state = 2;
|
||||
free(found_string);
|
||||
}
|
||||
else if (string_is_equal(found_string, "error"))
|
||||
{
|
||||
curr_state = 3;
|
||||
free(found_string);
|
||||
}
|
||||
else
|
||||
{
|
||||
curr_state = 0;
|
||||
free(found_string);
|
||||
}
|
||||
start = -1;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (found_string)
|
||||
free(found_string);
|
||||
|
||||
if (string_is_equal(error_string, "No text found."))
|
||||
{
|
||||
RARCH_LOG("No text found...\n");
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (menu_widgets_paused)
|
||||
{
|
||||
/* In this case we have to unpause and then repause for a frame */
|
||||
menu_widgets_ai_service_overlay_set_state(2);
|
||||
command_event(CMD_EVENT_UNPAUSE, NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!raw_image_file_data && !raw_sound_data)
|
||||
{
|
||||
@ -2806,140 +2830,193 @@ static void handle_translation_cb(
|
||||
/* Get the video frame dimensions reference */
|
||||
video_driver_cached_frame_get(&dummy_data, &width, &height, &pitch);
|
||||
|
||||
if (raw_image_file_data[0] == 'B' && raw_image_file_data[1] == 'M')
|
||||
/* try two different modes for text display *
|
||||
* In the first mode, we use menu widget overlays, but they require
|
||||
* the video poke interface to be able to load image buffers.
|
||||
*
|
||||
* The other method is to draw to the video buffer directly, which needs
|
||||
* a software core to be running. */
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (video_driver_poke
|
||||
&& video_driver_poke->load_texture && video_driver_poke->unload_texture)
|
||||
{
|
||||
/* This is a BMP file coming back. */
|
||||
/* Get image data (24 bit), and convert to the emulated pixel format */
|
||||
image_width =
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[21]) << 24) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[20]) << 16) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[19]) << 8) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[18]) << 0);
|
||||
|
||||
image_height =
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[25]) << 24) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[24]) << 16) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[23]) << 8) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[22]) << 0);
|
||||
raw_image_data = malloc(image_width*image_height*3*sizeof(uint8_t));
|
||||
memcpy(raw_image_data,
|
||||
raw_image_file_data+54*sizeof(uint8_t),
|
||||
image_width*image_height*3*sizeof(uint8_t));
|
||||
}
|
||||
else if (raw_image_file_data[1] == 'P' && raw_image_file_data[2] == 'N' &&
|
||||
raw_image_file_data[3] == 'G')
|
||||
{
|
||||
rpng_t *rpng = NULL;
|
||||
/* PNG coming back from the url */
|
||||
image_width =
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[16])<<24)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[17])<<16)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[18])<<8)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[19])<<0);
|
||||
image_height =
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[20])<<24)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[21])<<16)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[22])<<8)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[23])<<0);
|
||||
rpng = rpng_alloc();
|
||||
|
||||
if (!rpng)
|
||||
bool ai_res;
|
||||
enum image_type_enum image_type;
|
||||
/* Write to overlay */
|
||||
if (raw_image_file_data[0] == 'B' && raw_image_file_data[1] == 'M')
|
||||
{
|
||||
error = "Can't allocate memory.";
|
||||
image_type = IMAGE_TYPE_BMP;
|
||||
}
|
||||
else if (raw_image_file_data[1] == 'P' &&
|
||||
raw_image_file_data[2] == 'N' &&
|
||||
raw_image_file_data[3] == 'G')
|
||||
{
|
||||
image_type = IMAGE_TYPE_PNG;
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Invalid image type returned from server.\n");
|
||||
goto finish;
|
||||
}
|
||||
rpng_set_buf_ptr(rpng, raw_image_file_data, new_image_size);
|
||||
rpng_start(rpng);
|
||||
while (rpng_iterate_image(rpng));
|
||||
|
||||
do
|
||||
|
||||
ai_res = menu_widgets_ai_service_overlay_load(
|
||||
raw_image_file_data, (unsigned) new_image_size,
|
||||
image_type);
|
||||
|
||||
if (!ai_res)
|
||||
{
|
||||
retval = rpng_process_image(rpng, &raw_image_data_alpha, new_image_size, &image_width, &image_height);
|
||||
RARCH_LOG("Video driver not supported for AI Service.");
|
||||
runloop_msg_queue_push(
|
||||
/* msg_hash_to_str(MSG_VIDEO_DRIVER_NOT_SUPPORTED), */
|
||||
"Video driver not supported.",
|
||||
1, 180, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
while(retval == IMAGE_PROCESS_NEXT);
|
||||
|
||||
/* Returned output from the png processor is an upside down RGBA
|
||||
* image, so we have to change that to RGB first. This should
|
||||
* probably be replaced with a scaler call.*/
|
||||
else if (menu_widgets_paused)
|
||||
{
|
||||
int d,tw,th,tc;
|
||||
d=0;
|
||||
/* In this case we have to unpause and then repause for a frame */
|
||||
menu_widgets_ai_service_overlay_set_state(2);/* Unpausing state */
|
||||
command_event(CMD_EVENT_UNPAUSE, NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
/* Can't use menu widget overlays, so try writing to video buffer */
|
||||
{
|
||||
/* Write to video buffer directly (software cores only) */
|
||||
if (raw_image_file_data[0] == 'B' && raw_image_file_data[1] == 'M')
|
||||
{
|
||||
/* This is a BMP file coming back. */
|
||||
/* Get image data (24 bit), and convert to the emulated pixel format */
|
||||
image_width =
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[21]) << 24) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[20]) << 16) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[19]) << 8) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[18]) << 0);
|
||||
|
||||
image_height =
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[25]) << 24) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[24]) << 16) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[23]) << 8) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[22]) << 0);
|
||||
raw_image_data = malloc(image_width*image_height*3*sizeof(uint8_t));
|
||||
for (i=0;i<image_width*image_height*4;i++)
|
||||
memcpy(raw_image_data,
|
||||
raw_image_file_data+54*sizeof(uint8_t),
|
||||
image_width*image_height*3*sizeof(uint8_t));
|
||||
}
|
||||
else if (raw_image_file_data[1] == 'P' && raw_image_file_data[2] == 'N' &&
|
||||
raw_image_file_data[3] == 'G')
|
||||
{
|
||||
rpng_t *rpng = NULL;
|
||||
/* PNG coming back from the url */
|
||||
image_width =
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[16])<<24)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[17])<<16)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[18])<<8)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[19])<<0);
|
||||
image_height =
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[20])<<24)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[21])<<16)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[22])<<8)+
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[23])<<0);
|
||||
rpng = rpng_alloc();
|
||||
|
||||
if (!rpng)
|
||||
{
|
||||
if (i%4 != 3)
|
||||
error = "Can't allocate memory.";
|
||||
goto finish;
|
||||
}
|
||||
rpng_set_buf_ptr(rpng, raw_image_file_data, new_image_size);
|
||||
rpng_start(rpng);
|
||||
while (rpng_iterate_image(rpng));
|
||||
|
||||
do
|
||||
{
|
||||
retval = rpng_process_image(rpng, &raw_image_data_alpha, new_image_size, &image_width, &image_height);
|
||||
}
|
||||
while(retval == IMAGE_PROCESS_NEXT);
|
||||
|
||||
/* Returned output from the png processor is an upside down RGBA
|
||||
* image, so we have to change that to RGB first. This should
|
||||
* probably be replaced with a scaler call.*/
|
||||
{
|
||||
int d,tw,th,tc;
|
||||
d=0;
|
||||
raw_image_data = malloc(image_width*image_height*3*sizeof(uint8_t));
|
||||
for (i=0;i<image_width*image_height*4;i++)
|
||||
{
|
||||
tc = d%3;
|
||||
th = image_height-d/(3*image_width)-1;
|
||||
tw = (d%(image_width*3))/3;
|
||||
((uint8_t*) raw_image_data)[tw*3+th*3*image_width+tc] = ((uint8_t *)raw_image_data_alpha)[i];
|
||||
d+=1;
|
||||
if (i%4 != 3)
|
||||
{
|
||||
tc = d%3;
|
||||
th = image_height-d/(3*image_width)-1;
|
||||
tw = (d%(image_width*3))/3;
|
||||
((uint8_t*) raw_image_data)[tw*3+th*3*image_width+tc] = ((uint8_t *)raw_image_data_alpha)[i];
|
||||
d+=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
rpng_free(rpng);
|
||||
}
|
||||
rpng_free(rpng);
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Output from URL not a valid file type, or is not supported.\n");
|
||||
goto finish;
|
||||
}
|
||||
scaler = (struct scaler_ctx*)calloc(1, sizeof(struct scaler_ctx));
|
||||
if (!scaler)
|
||||
goto finish;
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Output from URL not a valid file type, or is not supported.\n");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (dummy_data == RETRO_HW_FRAME_BUFFER_VALID)
|
||||
{
|
||||
/*
|
||||
In this case, we used the viewport to grab the image
|
||||
and translate it, and we have the translated image in
|
||||
the raw_image_data buffer.
|
||||
scaler = (struct scaler_ctx*)calloc(1, sizeof(struct scaler_ctx));
|
||||
if (!scaler)
|
||||
goto finish;
|
||||
|
||||
if (dummy_data == RETRO_HW_FRAME_BUFFER_VALID)
|
||||
{
|
||||
/*
|
||||
In this case, we used the viewport to grab the image
|
||||
and translate it, and we have the translated image in
|
||||
the raw_image_data buffer.
|
||||
*/
|
||||
RARCH_LOG("Hardware frame buffer core, but selected video driver isn't supported.\n");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
/* The assigned pitch may not be reliable. The width of
|
||||
the video frame can change during run-time, but the
|
||||
pitch may not, so we just assign it as the width
|
||||
times the byte depth.
|
||||
*/
|
||||
|
||||
/* TODO: write to the viewport in this case */
|
||||
RARCH_LOG("Hardware frame buffer... writing to viewport"
|
||||
" not yet supported.\n");
|
||||
goto finish;
|
||||
if (video_driver_pix_fmt == RETRO_PIXEL_FORMAT_XRGB8888)
|
||||
{
|
||||
raw_output_data = (uint8_t*)malloc(width * height * 4 * sizeof(uint8_t));
|
||||
scaler->out_fmt = SCALER_FMT_ARGB8888;
|
||||
pitch = width * 4;
|
||||
scaler->out_stride = width * 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
raw_output_data = (uint8_t*)malloc(width * height * 2 * sizeof(uint8_t));
|
||||
scaler->out_fmt = SCALER_FMT_RGB565;
|
||||
pitch = width * 2;
|
||||
scaler->out_stride = width * 1;
|
||||
}
|
||||
|
||||
if (!raw_output_data)
|
||||
goto finish;
|
||||
|
||||
scaler->in_fmt = SCALER_FMT_BGR24;
|
||||
scaler->in_width = image_width;
|
||||
scaler->in_height = image_height;
|
||||
scaler->out_width = width;
|
||||
scaler->out_height = height;
|
||||
scaler->scaler_type = SCALER_TYPE_POINT;
|
||||
scaler_ctx_gen_filter(scaler);
|
||||
scaler->in_stride = -1 * width * 3;
|
||||
|
||||
scaler_ctx_scale_direct(scaler, raw_output_data,
|
||||
(uint8_t*)raw_image_data + (image_height - 1) * width * 3);
|
||||
video_driver_frame(raw_output_data, image_width, image_height, pitch);
|
||||
}
|
||||
|
||||
/* The assigned pitch may not be reliable. The width of
|
||||
the video frame can change during run-time, but the
|
||||
pitch may not, so we just assign it as the width
|
||||
times the byte depth.
|
||||
*/
|
||||
|
||||
if (video_driver_pix_fmt == RETRO_PIXEL_FORMAT_XRGB8888)
|
||||
{
|
||||
raw_output_data = (uint8_t*)malloc(width * height * 4 * sizeof(uint8_t));
|
||||
scaler->out_fmt = SCALER_FMT_ARGB8888;
|
||||
pitch = width * 4;
|
||||
scaler->out_stride = width * 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
raw_output_data = (uint8_t*)malloc(width * height * 2 * sizeof(uint8_t));
|
||||
scaler->out_fmt = SCALER_FMT_RGB565;
|
||||
pitch = width * 2;
|
||||
scaler->out_stride = width * 1;
|
||||
}
|
||||
|
||||
if (!raw_output_data)
|
||||
goto finish;
|
||||
|
||||
scaler->in_fmt = SCALER_FMT_BGR24;
|
||||
scaler->in_width = image_width;
|
||||
scaler->in_height = image_height;
|
||||
scaler->out_width = width;
|
||||
scaler->out_height = height;
|
||||
scaler->scaler_type = SCALER_TYPE_POINT;
|
||||
scaler_ctx_gen_filter(scaler);
|
||||
scaler->in_stride = -1 * width * 3;
|
||||
|
||||
scaler_ctx_scale_direct(scaler, raw_output_data,
|
||||
(uint8_t*)raw_image_data + (image_height - 1) * width * 3);
|
||||
video_driver_frame(raw_output_data, image_width, image_height, pitch);
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
if (raw_sound_data)
|
||||
{
|
||||
@ -2998,7 +3075,8 @@ finish:
|
||||
free(raw_image_data);
|
||||
if (scaler)
|
||||
free(scaler);
|
||||
|
||||
if (error_string)
|
||||
free(error_string);
|
||||
if (raw_output_data)
|
||||
free(raw_output_data);
|
||||
}
|
||||
@ -3163,10 +3241,10 @@ static const char *ai_service_get_str(enum translation_lang id)
|
||||
|
||||
To make your own server, it must listen for a POST request, which
|
||||
will consist of a JSON body, with the "image" field as a base64
|
||||
encoded string of a 24bit-BMP that the will be translated. The server
|
||||
must output the translated image in the form of a JSON body, with
|
||||
the "image" field also as a base64 encoded 24bit-BMP, or
|
||||
as an alpha channel png.
|
||||
encoded string of a 24bit-BMP/PNG that the will be translated.
|
||||
The server must output the translated image in the form of a
|
||||
JSON body, with the "image" field also as a base64 encoded
|
||||
24bit-BMP, or as an alpha channel png.
|
||||
*/
|
||||
static bool run_translation_service(void)
|
||||
{
|
||||
@ -3194,11 +3272,37 @@ static bool run_translation_service(void)
|
||||
const char *rf2 = "\"}\0";
|
||||
char *rf3 = NULL;
|
||||
bool TRANSLATE_USE_BMP = false;
|
||||
bool use_overlay = true;
|
||||
|
||||
const char *label = NULL;
|
||||
char* system_label = NULL;
|
||||
core_info_t *core_info = NULL;
|
||||
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (menu_widgets_ai_service_overlay_get_state() != 0)
|
||||
{
|
||||
/* For the case when ai service pause is disabled. */
|
||||
menu_widgets_ai_service_overlay_unload();
|
||||
goto finish;
|
||||
}
|
||||
#else
|
||||
if (!settings->bools.ai_service_pause)
|
||||
{
|
||||
RARCH_LOG("Pause toggle not supported without menu widgets.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (video_driver_poke
|
||||
&& video_driver_poke->load_texture && video_driver_poke->unload_texture)
|
||||
{
|
||||
use_overlay = true;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
use_overlay = false;
|
||||
|
||||
|
||||
/* get the core info here so we can pass long the game name */
|
||||
core_info_get_current_core(&core_info);
|
||||
|
||||
@ -3264,16 +3368,29 @@ static bool run_translation_service(void)
|
||||
goto finish;
|
||||
|
||||
if (!video_driver_read_viewport(bit24_image_prev, false))
|
||||
{
|
||||
RARCH_LOG("Could not read viewport for translation service...\n");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
/* TODO: Rescale down to regular resolution */
|
||||
width = vp.width;
|
||||
height = vp.height;
|
||||
bit24_image = bit24_image_prev;
|
||||
bit24_image_prev = NULL;
|
||||
scaler->in_fmt = SCALER_FMT_BGR24;
|
||||
scaler->out_fmt = SCALER_FMT_BGR24;
|
||||
scaler->scaler_type = SCALER_TYPE_POINT;
|
||||
scaler->in_width = vp.width;
|
||||
scaler->in_height = vp.height;
|
||||
scaler->out_width = width;
|
||||
scaler->out_height = height;
|
||||
scaler_ctx_gen_filter(scaler);
|
||||
|
||||
scaler->in_stride = vp.width*3;
|
||||
scaler->out_stride = width*3;
|
||||
scaler_ctx_scale_direct(scaler, bit24_image, bit24_image_prev);
|
||||
scaler_ctx_gen_reset(scaler);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is a software core, so just change the pixel format to 24-bit. */
|
||||
bit24_image = (uint8_t*)malloc(width * height * 3);
|
||||
if (!bit24_image)
|
||||
goto finish;
|
||||
@ -3298,13 +3415,14 @@ static bool run_translation_service(void)
|
||||
goto finish;
|
||||
}
|
||||
|
||||
/*
|
||||
At this point, we should have a screenshot in the buffer, so allocate
|
||||
an array to contain the BMP image along with the BMP header as bytes,
|
||||
and then covert that to a b64 encoded array for transport in JSON.
|
||||
*/
|
||||
if (TRANSLATE_USE_BMP)
|
||||
{
|
||||
/*
|
||||
At this point, we should have a screenshot in the buffer, so allocate
|
||||
an array to contain the BMP image along with the BMP header as bytes,
|
||||
and then covert that to a b64 encoded array for transport in JSON.
|
||||
*/
|
||||
|
||||
form_bmp_header(header, width, height, false);
|
||||
bmp_buffer = (uint8_t*)malloc(width * height * 3+54);
|
||||
if (!bmp_buffer)
|
||||
@ -3355,7 +3473,7 @@ static bool run_translation_service(void)
|
||||
memcpy(json_buffer+11+out_length, (const void*)rf3, (16+strlen(system_label))*sizeof(uint8_t));
|
||||
else
|
||||
memcpy(json_buffer+11+out_length, (const void*)rf2, 3*sizeof(uint8_t));
|
||||
|
||||
RARCH_LOG("Request size: %d\n", out_length);
|
||||
{
|
||||
char separator = '?';
|
||||
char new_ai_service_url[PATH_MAX_LENGTH];
|
||||
@ -3409,9 +3527,23 @@ static bool run_translation_service(void)
|
||||
|
||||
/*"image" is included for backwards compatability with
|
||||
* vgtranslate < 1.04 */
|
||||
char* mode_chr = "image,png";
|
||||
if (settings->uints.ai_service_mode == 1)
|
||||
char* mode_chr;
|
||||
if (settings->uints.ai_service_mode == 0)
|
||||
{
|
||||
if (use_overlay)
|
||||
mode_chr = "image,png,png-a";
|
||||
else
|
||||
mode_chr = "image,png";
|
||||
}
|
||||
else if (settings->uints.ai_service_mode == 1)
|
||||
mode_chr = "sound,wav";
|
||||
else if (settings->uints.ai_service_mode == 2)
|
||||
{
|
||||
if (use_overlay)
|
||||
mode_chr = "image,png,png-a,sound,wav";
|
||||
else
|
||||
mode_chr = "image,png,sound,wav";
|
||||
}
|
||||
|
||||
snprintf(temp_string,
|
||||
sizeof(temp_string),
|
||||
@ -3421,7 +3553,7 @@ static bool run_translation_service(void)
|
||||
strlcat(new_ai_service_url, temp_string,
|
||||
sizeof(new_ai_service_url));
|
||||
}
|
||||
|
||||
RARCH_LOG("SENDING... %s\n", new_ai_service_url);
|
||||
task_push_http_post_transfer(new_ai_service_url,
|
||||
json_buffer, true, NULL, handle_translation_cb, NULL);
|
||||
}
|
||||
@ -4625,7 +4757,6 @@ static void retroarch_pause_checks(void)
|
||||
if (is_paused)
|
||||
{
|
||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_PAUSED));
|
||||
command_event(CMD_EVENT_AUDIO_STOP, NULL);
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (menu_widgets_inited)
|
||||
@ -4652,8 +4783,13 @@ static void retroarch_pause_checks(void)
|
||||
menu_widgets_paused = is_paused;
|
||||
#endif
|
||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_UNPAUSED));
|
||||
command_event(CMD_EVENT_AUDIO_START, NULL);
|
||||
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (menu_widgets_ai_service_overlay_get_state() == 1)
|
||||
menu_widgets_ai_service_overlay_unload();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void retroarch_frame_time_free(void)
|
||||
@ -4749,23 +4885,26 @@ bool command_event(enum event_command cmd, void *data)
|
||||
{
|
||||
#ifdef HAVE_TRANSLATE
|
||||
settings_t *settings = configuration_settings;
|
||||
if (settings->uints.ai_service_mode == 0)
|
||||
if (settings->bools.ai_service_pause)
|
||||
{
|
||||
/* Default mode - pause on call, unpause on second press. */
|
||||
/* pause on call, unpause on second press. */
|
||||
if (!runloop_paused)
|
||||
{
|
||||
command_event(CMD_EVENT_PAUSE, NULL);
|
||||
command_event(CMD_EVENT_AI_SERVICE_CALL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
command_event(CMD_EVENT_UNPAUSE, NULL);
|
||||
}
|
||||
/* Text-to-Speech mode - don't pause */
|
||||
else if (settings->uints.ai_service_mode == 1)
|
||||
command_event(CMD_EVENT_AI_SERVICE_CALL, NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Invalid AI Service Mode.\n");
|
||||
/* Don't pause - useful for Text-To-Speech since
|
||||
* the audio can't currently play while paused.
|
||||
* Also useful for cases when users don't want the
|
||||
* core's sound to stop while translating. */
|
||||
command_event(CMD_EVENT_AI_SERVICE_CALL, NULL);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
@ -4965,7 +5104,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event_save_auto_state();
|
||||
command_event_disable_overrides();
|
||||
retroarch_unset_runtime_shader_preset();
|
||||
|
||||
|
||||
if (cached_video_driver[0])
|
||||
{
|
||||
settings_t *settings = configuration_settings;
|
||||
@ -7284,6 +7423,43 @@ static bool dynamic_request_hw_context(enum retro_hw_context_type type,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool dynamic_verify_hw_context(enum retro_hw_context_type type,
|
||||
unsigned minor, unsigned major)
|
||||
{
|
||||
settings_t *settings = configuration_settings;
|
||||
const char *video_ident = settings->arrays.video_driver;
|
||||
|
||||
if (settings->bools.driver_switch_enable)
|
||||
return true;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case RETRO_HW_CONTEXT_VULKAN:
|
||||
if (!string_is_equal(video_ident, "vulkan"))
|
||||
return false;
|
||||
break;
|
||||
case RETRO_HW_CONTEXT_OPENGLES2:
|
||||
case RETRO_HW_CONTEXT_OPENGLES3:
|
||||
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
|
||||
case RETRO_HW_CONTEXT_OPENGL:
|
||||
case RETRO_HW_CONTEXT_OPENGL_CORE:
|
||||
if (!string_is_equal(video_ident, "gl") &&
|
||||
!string_is_equal(video_ident, "glcore"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case RETRO_HW_CONTEXT_DIRECT3D:
|
||||
if (!(string_is_equal(video_ident, "d3d11") && major == 11))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void rarch_log_libretro(enum retro_log_level level,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
@ -7841,7 +8017,9 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
unsigned *cb = (unsigned*)data;
|
||||
settings_t *settings = configuration_settings;
|
||||
RARCH_LOG("[Environ]: GET_PREFERRED_HW_RENDER.\n");
|
||||
if (!strcmp(settings->arrays.video_driver, "glcore"))
|
||||
if (!settings->bools.driver_switch_enable)
|
||||
return false;
|
||||
else if (!strcmp(settings->arrays.video_driver, "glcore"))
|
||||
*cb = RETRO_HW_CONTEXT_OPENGL_CORE;
|
||||
else if (!strcmp(settings->arrays.video_driver, "gl"))
|
||||
*cb = RETRO_HW_CONTEXT_OPENGL;
|
||||
@ -7863,11 +8041,15 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
video_driver_get_hw_context_internal();
|
||||
|
||||
RARCH_LOG("[Environ]: SET_HW_RENDER.\n");
|
||||
|
||||
|
||||
if (!dynamic_request_hw_context(
|
||||
cb->context_type, cb->version_minor, cb->version_major))
|
||||
return false;
|
||||
|
||||
if (!dynamic_verify_hw_context(
|
||||
cb->context_type, cb->version_minor, cb->version_major))
|
||||
return false;
|
||||
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL_CORE)
|
||||
if (!gl_set_core_context(cb->context_type)) { }
|
||||
#endif
|
||||
@ -19594,8 +19776,14 @@ static void video_driver_frame(const void *data, unsigned width,
|
||||
if (!video_driver_active)
|
||||
return;
|
||||
|
||||
if (data)
|
||||
frame_cache_data = data;
|
||||
frame_cache_width = width;
|
||||
frame_cache_height = height;
|
||||
frame_cache_pitch = pitch;
|
||||
|
||||
if (
|
||||
video_driver_scaler_ptr
|
||||
video_driver_scaler_ptr
|
||||
&& data
|
||||
&& (video_driver_pix_fmt == RETRO_PIXEL_FORMAT_0RGB1555)
|
||||
&& (data != RETRO_HW_FRAME_BUFFER_VALID)
|
||||
@ -19609,12 +19797,6 @@ static void video_driver_frame(const void *data, unsigned width,
|
||||
pitch = video_driver_scaler_ptr->scaler->out_stride;
|
||||
}
|
||||
|
||||
if (data)
|
||||
frame_cache_data = data;
|
||||
frame_cache_width = width;
|
||||
frame_cache_height = height;
|
||||
frame_cache_pitch = pitch;
|
||||
|
||||
video_driver_build_info(&video_info);
|
||||
|
||||
/* Get the amount of frames per seconds. */
|
||||
@ -21308,6 +21490,10 @@ static void drivers_init(int flags)
|
||||
menu_widgets_context_reset(video_is_threaded,
|
||||
video_driver_width, video_driver_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
menu_display_init_first_driver(video_is_threaded);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (flags & DRIVER_VIDEO_MASK)
|
||||
@ -24802,6 +24988,14 @@ static enum runloop_state runloop_check_state(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (menu_widgets_ai_service_overlay_get_state() == 3)
|
||||
{
|
||||
command_event(CMD_EVENT_PAUSE, NULL);
|
||||
menu_widgets_ai_service_overlay_set_state(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
/* Should be called once per frame */
|
||||
if (!appletMainLoop())
|
||||
|
@ -6,8 +6,8 @@
|
||||
# /* - pkg/snap/snapcraft.yaml (including the github url) */
|
||||
|
||||
#if 0
|
||||
RARCH_VERSION="1.7.9"
|
||||
RARCH_VERSION="1.8.0"
|
||||
#endif
|
||||
#ifndef PACKAGE_VERSION
|
||||
#define PACKAGE_VERSION "1.7.9"
|
||||
#define PACKAGE_VERSION "1.8.0"
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user