diff --git a/intl/msg_hash_be.h b/intl/msg_hash_be.h index 7387ba17703..00ce5ecb560 100644 --- a/intl/msg_hash_be.h +++ b/intl/msg_hash_be.h @@ -3972,6 +3972,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, "Змяніць адлюстраванне элементаў меню RetroArch." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, + "Выгляд" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SETTINGS, + "Змяніць налады выгляду экраннага меню." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_APPICON_SETTINGS, "Значок праграмы" @@ -4841,7 +4849,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_APPEARANCE_SETTINGS, - "Вонкавы выгляд" + "Выгляд" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_APPEARANCE_ANCHOR_TOPLEFT, @@ -7945,7 +7953,7 @@ MSG_HASH( ) MSG_HASH( MSG_CAPABILITIES, - "Здольнасці" + "Магчымасці" ) MSG_HASH( MSG_FETCHING_CORE_LIST, diff --git a/intl/msg_hash_hu.h b/intl/msg_hash_hu.h index e4f7288b228..8a5c23a7005 100644 --- a/intl/msg_hash_hu.h +++ b/intl/msg_hash_hu.h @@ -6550,6 +6550,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "A \"Kedvencekhez ad\" lehetőség jelenjen meg." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_PLAYLIST, + "\"Hozzáadás játéklistához\" látható" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_PLAYLIST, + "A \"Hozzáadás játéklistához\" lehetőség jelenjen meg." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION, "\"Társítás maghoz\" látható" diff --git a/intl/progress.h b/intl/progress.h index 5f2fe502462..e434b80b94a 100644 --- a/intl/progress.h +++ b/intl/progress.h @@ -75,7 +75,7 @@ #define LANGUAGE_PROGRESS_CROATIAN_APPROVED 0 /* Hungarian */ -#define LANGUAGE_PROGRESS_HUNGARIAN_TRANSLATED 99 +#define LANGUAGE_PROGRESS_HUNGARIAN_TRANSLATED 100 #define LANGUAGE_PROGRESS_HUNGARIAN_APPROVED 0 /* Indonesian */ diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 26968d78679..435fb4475fd 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -37,6 +37,7 @@ #endif #include "../../frontend/frontend_driver.h" +#include "../../ui/ui_companion_driver.h" #include "../menu_driver.h" #include "../menu_screensaver.h" @@ -175,7 +176,8 @@ enum materialui_node_icon_type MUI_ICON_TYPE_MENU_EXPLORE, MUI_ICON_TYPE_PLAYLIST, MUI_ICON_TYPE_MENU_CONTENTLESS_CORE, - MUI_ICON_TYPE_ACHIEVEMENT + MUI_ICON_TYPE_ACHIEVEMENT, + MUI_ICON_TYPE_APPICON }; /* Defines all standard menu textures */ @@ -4011,6 +4013,14 @@ static void materialui_render_menu_entry_default( uintptr_t icon_texture = 0; bool draw_text_outside = (x_offset != 0); gfx_display_t *p_disp = disp_get_ptr(); + uico_driver_state_t *uico_st = uico_state_get_ptr(); + + static float color_white[16] = { + 1.0f, 1.0f, 1.0f, 1.0f, + 1.0f, 1.0f, 1.0f, 1.0f, + 1.0f, 1.0f, 1.0f, 1.0f, + 1.0f, 1.0f, 1.0f, 1.0f, + }; if (!p_disp->dispctx->handles_transform) { @@ -4076,12 +4086,6 @@ static void materialui_render_menu_entry_default( if (icon_texture) { /* draw the icon ourselves - the draw_icon below tints it to match the theme */ - static float color_white[16] = { - 1.0f, 1.0f, 1.0f, 1.0f, - 1.0f, 1.0f, 1.0f, 1.0f, - 1.0f, 1.0f, 1.0f, 1.0f, - 1.0f, 1.0f, 1.0f, 1.0f, - }; materialui_draw_icon( userdata, p_disp, video_width, @@ -4116,6 +4120,33 @@ static void materialui_render_menu_entry_default( } break; #endif + case MUI_ICON_TYPE_APPICON: + if (uico_st->drv && uico_st->drv->get_app_icon_texture) + { + icon_texture = uico_st->drv->get_app_icon_texture(entry_label); + if (icon_texture) + { + /* draw the icon ourselves - the draw_icon below tints it to match the theme */ + materialui_draw_icon( + userdata, p_disp, + video_width, + video_height, + mui->icon_size, + (uintptr_t)icon_texture, + entry_x + (int)mui->landscape_optimization.entry_margin, + entry_y + (node->entry_height / 2.0f) - (mui->icon_size / 2.0f), + 0, + 1, + color_white, + &mymat); + + entry_margin += mui->icon_size; + usable_width -= mui->icon_size; + + icon_texture = 0; /* prevent drawing tinted icon */ + } + } + break; default: switch (entry_file_type) { @@ -10481,6 +10512,13 @@ static void materialui_list_insert( case MENU_SETTING_ACTION_CONTENTLESS_CORE_RUN: node->icon_type = MUI_ICON_TYPE_MENU_CONTENTLESS_CORE; break; + case MENU_SETTING_DROPDOWN_SETTING_STRING_OPTIONS_ITEM: + if (atoi(fullpath) == MENU_ENUM_LABEL_APPICON_SETTINGS) + { + node->icon_type = MUI_ICON_TYPE_APPICON; + } + /* for other types we don't have an icon */ + break; case FILE_TYPE_RPL_ENTRY: case MENU_SETTING_DROPDOWN_ITEM: case MENU_SETTING_DROPDOWN_ITEM_RESOLUTION: @@ -10498,7 +10536,6 @@ static void materialui_list_insert( case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION: case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION_KBD: case MENU_SETTING_DROPDOWN_SETTING_CORE_OPTIONS_ITEM: - case MENU_SETTING_DROPDOWN_SETTING_STRING_OPTIONS_ITEM: case MENU_SETTING_DROPDOWN_SETTING_FLOAT_ITEM: case MENU_SETTING_DROPDOWN_SETTING_INT_ITEM: case MENU_SETTING_DROPDOWN_SETTING_UINT_ITEM: diff --git a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/README.md b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/README.md index 612c56b7a43..96f60d2ce99 100644 --- a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/README.md +++ b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/README.md @@ -1,4 +1,5 @@ # MESA PreBuilt Libraries The Binaries in this folder are compiled from a custom version of [MESA](https://github.com/aerisarn/mesa-uwp). -These are based on this [tag](https://github.com/aerisarn/mesa-uwp/releases/tag/alpha-2-resfix). +These are based on this [branch](https://github.com/aerisarn/mesa-uwp/releases/tag/alpha-2-hack-fixes), which is the +stable branch for MESA integration into Retroarch. diff --git a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libEGL.dll b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libEGL.dll index 14e0193610a..b01e8836039 100644 Binary files a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libEGL.dll and b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libEGL.dll differ diff --git a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libGLESv2.dll b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libGLESv2.dll index 8b1d082bb9e..ad97bfe2b75 100644 Binary files a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libGLESv2.dll and b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libGLESv2.dll differ diff --git a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libgallium_wgl.dll b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libgallium_wgl.dll index 997d50c44d2..98c84ebfa75 100644 Binary files a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libgallium_wgl.dll and b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libgallium_wgl.dll differ diff --git a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libglapi.dll b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libglapi.dll index 4a03c7ca5b8..7d2c7505587 100644 Binary files a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libglapi.dll and b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/libglapi.dll differ diff --git a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/opengl32.dll b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/opengl32.dll index 115453416a6..2603e9fc938 100644 Binary files a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/opengl32.dll and b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/opengl32.dll differ diff --git a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/z-1.dll b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/z-1.dll index 85bfcf541aa..c373354125d 100644 Binary files a/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/z-1.dll and b/pkg/msvc-uwp/RetroArch-msvcUWP/MESA/x64/z-1.dll differ diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index 54652d18d66..75819a2bb57 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -1117,6 +1117,7 @@ static void ui_companion_cocoa_event_command(void *data, enum event_command cmd) NULL, /* is_active */ NULL, /* get_app_icons */ NULL, /* set_app_icon */ + NULL, /* get_app_icon_texture */ &ui_browser_window_cocoa, &ui_msg_window_cocoa, &ui_window_cocoa, diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index 00ab52e8cea..722384ebf0b 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -105,6 +105,40 @@ static void ui_companion_cocoatouch_set_app_icon(const char *iconName) [[UIApplication sharedApplication] setAlternateIconName:str completionHandler:nil]; } +static uintptr_t ui_companion_cocoatouch_get_app_icon_texture(const char *icon) +{ + static NSMutableDictionary *textures = nil; + static dispatch_once_t once; + dispatch_once(&once, ^{ + textures = [NSMutableDictionary dictionaryWithCapacity:6]; + }); + + NSString *iconName = [NSString stringWithUTF8String:icon]; + if (!textures[iconName]) + { + UIImage *img = [UIImage imageNamed:iconName]; + if (!img) + { + RARCH_LOG("could not load %s\n", icon); + return NULL; + } + NSData *png = UIImagePNGRepresentation(img); + if (!png) + { + RARCH_LOG("could not get png for %s\n", icon); + return NULL; + } + + uintptr_t item; + gfx_display_reset_textures_list_buffer(&item, TEXTURE_FILTER_MIPMAP_LINEAR, + (void*)[png bytes], (unsigned int)[png length], IMAGE_TYPE_PNG, + NULL, NULL); + textures[iconName] = [NSNumber numberWithUnsignedLong:item]; + } + + return [textures[iconName] unsignedLongValue]; +} + static void rarch_draw_observer(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) { @@ -506,22 +540,6 @@ - (void)handleAudioSessionInterruption:(NSNotification *)notification } } -- (NSData *)pngForIcon:(NSString *)iconName -{ - UIImage *img; - NSData *png; - img = [UIImage imageNamed:iconName]; - if (!img) - NSLog(@"could not load %@\n", iconName); - else - { - png = UIImagePNGRepresentation(img); - if (!png) - NSLog(@"could not get png for %@\n", iconName); - } - return png; -} - - (void)applicationDidFinishLaunching:(UIApplication *)application { char arguments[] = "retroarch"; @@ -763,6 +781,7 @@ - (void)didReceiveDiagnosticPayloads:(NSArray *)payloads NULL, /* is_active */ ui_companion_cocoatouch_get_app_icons, ui_companion_cocoatouch_set_app_icon, + ui_companion_cocoatouch_get_app_icon_texture, NULL, /* browser_window */ NULL, /* msg_window */ NULL, /* window */ diff --git a/ui/drivers/ui_qt.cpp b/ui/drivers/ui_qt.cpp index 1f5a6ff7337..e89b0ac98f1 100644 --- a/ui/drivers/ui_qt.cpp +++ b/ui/drivers/ui_qt.cpp @@ -4992,6 +4992,7 @@ ui_companion_driver_t ui_companion_qt = { ui_companion_qt_is_active, NULL, /* get_app_icons */ NULL, /* set_app_icon */ + NULL, /* get_app_icon_texture */ &ui_browser_window_qt, &ui_msg_window_qt, &ui_window_qt, diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index fd4520270cd..54803c6296b 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -338,6 +338,7 @@ ui_companion_driver_t ui_companion_win32 = { NULL, /* is_active */ NULL, /* get_app_icons */ NULL, /* set_app_icon */ + NULL, /* get_app_icon_texture */ &ui_browser_window_win32, &ui_msg_window_win32, &ui_window_win32, diff --git a/ui/ui_companion_driver.c b/ui/ui_companion_driver.c index 92408eaf2b4..649891188b8 100644 --- a/ui/ui_companion_driver.c +++ b/ui/ui_companion_driver.c @@ -40,6 +40,7 @@ static ui_companion_driver_t ui_companion_null = { NULL, /* is_active */ NULL, /* get_app_icons */ NULL, /* set_app_icon */ + NULL, /* get_app_icon_texture */ NULL, /* browser_window */ NULL, /* msg_window */ NULL, /* window */ diff --git a/ui/ui_companion_driver.h b/ui/ui_companion_driver.h index 0e5f8c21e39..5c3520fc451 100644 --- a/ui/ui_companion_driver.h +++ b/ui/ui_companion_driver.h @@ -133,6 +133,7 @@ typedef struct ui_companion_driver bool (*is_active)(void *data); struct string_list *(*get_app_icons)(void); void (*set_app_icon)(const char *icon); + uintptr_t (*get_app_icon_texture)(const char *icon); ui_browser_window_t *browser_window; ui_msg_window_t *msg_window; ui_window_t *window; diff --git a/uwp/uwp_main.cpp b/uwp/uwp_main.cpp index 92bbfd0acfc..15266cdb41f 100644 --- a/uwp/uwp_main.cpp +++ b/uwp/uwp_main.cpp @@ -939,8 +939,13 @@ extern "C" { return (void*)CoreWindow::GetForCurrentThread(); } + int current_height = -1; + int uwp_get_height(void) { + if (current_height != -1) + return current_height; + /* This function must be performed within UI thread, * otherwise it will cause a crash in specific cases * https://github.com/libretro/RetroArch/issues/13491 */ @@ -974,11 +979,17 @@ extern "C" { if (corewindow) corewindow->Dispatcher->ProcessEvents(Windows::UI::Core::CoreProcessEventsOption::ProcessAllIfPresent); } + current_height = ret; return ret; } + int current_width = -1; + int uwp_get_width(void) { + if (current_width != -1) + return current_width; + /* This function must be performed within UI thread, * otherwise it will cause a crash in specific cases * https://github.com/libretro/RetroArch/issues/13491 */ @@ -1012,7 +1023,7 @@ extern "C" { if (corewindow) corewindow->Dispatcher->ProcessEvents(Windows::UI::Core::CoreProcessEventsOption::ProcessAllIfPresent); } - + current_width = returnValue; return returnValue; }