diff --git a/config.def.h b/config.def.h index 02fe8569cc..362672ca6b 100644 --- a/config.def.h +++ b/config.def.h @@ -244,6 +244,11 @@ static const bool aspect_ratio_auto = false; static unsigned aspect_ratio_idx = ASPECT_RATIO_16_9; #elif defined(PSP) static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE; +#elif defined(_3DS) +/* Previously defaulted to ASPECT_RATIO_4_3. + * Non-4:3 content looks dreadful when stretched + * to 4:3 on the 3DS screen... */ +static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE; #elif defined(RARCH_CONSOLE) static unsigned aspect_ratio_idx = ASPECT_RATIO_4_3; #else diff --git a/configuration.c b/configuration.c index 4264d236a5..e778f43a09 100644 --- a/configuration.c +++ b/configuration.c @@ -543,6 +543,9 @@ static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_CORELOCATION static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_NULL; #endif +#if defined(_3DS) && defined(HAVE_RGUI) +static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_RGUI; +#else #if defined(HAVE_XUI) static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_XUI; #elif defined(HAVE_MATERIALUI) && defined(RARCH_MOBILE) @@ -556,7 +559,7 @@ static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_RGUI; #else static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_NULL; #endif - +#endif #define GENERAL_SETTING(key, configval, default_enable, default_setting, type, handle_setting) \ { \ @@ -678,7 +681,7 @@ const char *config_get_default_audio(void) case AUDIO_PS2: return "ps2"; case AUDIO_CTR: - return "csnd"; + return "dsp"; case AUDIO_SWITCH: return "switch"; case AUDIO_RWEBAUDIO: diff --git a/frontend/drivers/platform_ctr.c b/frontend/drivers/platform_ctr.c index 68110a0f28..58fb331736 100644 --- a/frontend/drivers/platform_ctr.c +++ b/frontend/drivers/platform_ctr.c @@ -240,13 +240,15 @@ static void frontend_ctr_exec(const char* path, bool should_load_game) } else { - RARCH_LOG("\n"); - RARCH_LOG("\n"); - RARCH_LOG("Warning:\n"); - RARCH_LOG("First core launch may take 20 seconds!\n"); - RARCH_LOG("Do not force quit before then or your memory card may be corrupted!\n"); - RARCH_LOG("\n"); - RARCH_LOG("\n"); + RARCH_WARN("\n"); + RARCH_WARN("\n"); + RARCH_WARN("Warning:\n"); + RARCH_WARN("First core launch may take 20\n"); + RARCH_WARN("seconds! Do not force quit\n"); + RARCH_WARN("before then or your memory\n"); + RARCH_WARN("card may be corrupted!\n"); + RARCH_WARN("\n"); + RARCH_WARN("\n"); exec_cia(path, arg_data); } @@ -356,6 +358,17 @@ static void ctr_check_dspfirm(void) } fclose(code_fp); } + else + { + RARCH_WARN("\n"); + RARCH_WARN("\n"); + RARCH_WARN("Warning:\n"); + RARCH_WARN("3DS DSP dump is missing.\n"); + RARCH_WARN("A working DSP dump is required\n"); + RARCH_WARN("for correct operation.\n"); + RARCH_WARN("\n"); + RARCH_WARN("\n"); + } } } diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index f3c579af21..b9416d2f13 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -315,7 +315,14 @@ bool egl_init_context(egl_ctx_data_t *egl, EGLint *major, EGLint *minor, EGLint *n, const EGLint *attrib_ptr) { - EGLDisplay dpy = get_egl_display(platform, display_data); + int i; + EGLint id; + EGLConfig *configs = NULL; + EGLint count = 0; + EGLint matched = 0; + int config_index = -1; + EGLDisplay dpy = get_egl_display(platform, display_data); + if (dpy == EGL_NO_DISPLAY) { RARCH_ERR("[EGL]: Couldn't get EGL display.\n"); @@ -329,8 +336,49 @@ bool egl_init_context(egl_ctx_data_t *egl, RARCH_LOG("[EGL]: EGL version: %d.%d\n", *major, *minor); +#ifdef HAVE_GBM + if (!eglGetConfigs(egl->dpy, NULL, 0, &count) || count < 1) + { + RARCH_ERR("[EGL]: No configs to choose from.\n"); + return false; + } + + configs = malloc(count * sizeof *configs); + if (!configs) + return false; + + if (!eglChooseConfig(egl->dpy, attrib_ptr, + configs, count, &matched) || !matched) + { + RARCH_ERR("[EGL]: No EGL configs with appropriate attributes.\n"); + return false; + } + + for (i = 0; i < count; ++i) + { + if (!eglGetConfigAttrib(egl->dpy, + configs[i], EGL_NATIVE_VISUAL_ID, &id)) + continue; + + if (id == GBM_FORMAT_XRGB8888) + break; + } + + if (id != GBM_FORMAT_XRGB8888) + { + RARCH_ERR("[EGL]: No EGL configs with format XRGB8888\n"); + return false; + } + + config_index = i; + if (config_index != -1) + egl->config = configs[config_index]; + + free(configs); +#else if (!eglChooseConfig(egl->dpy, attrib_ptr, &egl->config, 1, n) || *n != 1) return false; +#endif egl->major = g_egl_major; egl->minor = g_egl_minor; diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index f9314ada30..a9d96062e0 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -622,18 +622,24 @@ static LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message, static void win32_set_position_from_config(void) { settings_t *settings = config_get_ptr(); + int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME); + int title_bar_height = GetSystemMetrics(SM_CYCAPTION); + int menu_bar_height = GetSystemMetrics(SM_CYMENU); if (!settings->bools.video_window_save_positions) return; g_win32_pos_x = settings->uints.window_position_x; g_win32_pos_y = settings->uints.window_position_y; - g_win32_pos_width = settings->uints.window_position_width; - g_win32_pos_height= settings->uints.window_position_height; + g_win32_pos_width = settings->uints.window_position_width + border_thickness * 2; + g_win32_pos_height= settings->uints.window_position_height + border_thickness * 2 + title_bar_height; } static void win32_save_position(void) { RECT rect; + int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME); + int title_bar_height = GetSystemMetrics(SM_CYCAPTION); + int menu_bar_height = GetSystemMetrics(SM_CYMENU); WINDOWPLACEMENT placement; settings_t *settings = config_get_ptr(); memset(&placement, 0, sizeof(placement)); @@ -655,8 +661,8 @@ static void win32_save_position(void) { settings->uints.window_position_x = g_win32_pos_x; settings->uints.window_position_y = g_win32_pos_y; - settings->uints.window_position_width = g_win32_pos_width; - settings->uints.window_position_height = g_win32_pos_height; + settings->uints.window_position_width = g_win32_pos_width - border_thickness * 2; + settings->uints.window_position_height = g_win32_pos_height - border_thickness * 2 - title_bar_height - (settings->bools.ui_menubar_enable ? menu_bar_height : 0); } } } diff --git a/gfx/drivers/sixel_gfx.c b/gfx/drivers/sixel_gfx.c index 8daecdaa32..d49c3dd74f 100644 --- a/gfx/drivers/sixel_gfx.c +++ b/gfx/drivers/sixel_gfx.c @@ -30,6 +30,7 @@ #include "../../driver.h" #include "../../configuration.h" +#include "../../retroarch.h" #include "../../verbosity.h" #include "../../frontend/frontend_driver.h" #include "../common/sixel_common.h"