Merge branch 'master' into master
This commit is contained in:
commit
d82987b1b5
|
@ -244,6 +244,11 @@ static const bool aspect_ratio_auto = false;
|
||||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_16_9;
|
static unsigned aspect_ratio_idx = ASPECT_RATIO_16_9;
|
||||||
#elif defined(PSP)
|
#elif defined(PSP)
|
||||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
|
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)
|
#elif defined(RARCH_CONSOLE)
|
||||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_4_3;
|
static unsigned aspect_ratio_idx = ASPECT_RATIO_4_3;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -543,6 +543,9 @@ static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_CORELOCATION
|
||||||
static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_NULL;
|
static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_3DS) && defined(HAVE_RGUI)
|
||||||
|
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_RGUI;
|
||||||
|
#else
|
||||||
#if defined(HAVE_XUI)
|
#if defined(HAVE_XUI)
|
||||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_XUI;
|
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_XUI;
|
||||||
#elif defined(HAVE_MATERIALUI) && defined(RARCH_MOBILE)
|
#elif defined(HAVE_MATERIALUI) && defined(RARCH_MOBILE)
|
||||||
|
@ -556,7 +559,7 @@ static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_RGUI;
|
||||||
#else
|
#else
|
||||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_NULL;
|
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_NULL;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GENERAL_SETTING(key, configval, default_enable, default_setting, type, handle_setting) \
|
#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:
|
case AUDIO_PS2:
|
||||||
return "ps2";
|
return "ps2";
|
||||||
case AUDIO_CTR:
|
case AUDIO_CTR:
|
||||||
return "csnd";
|
return "dsp";
|
||||||
case AUDIO_SWITCH:
|
case AUDIO_SWITCH:
|
||||||
return "switch";
|
return "switch";
|
||||||
case AUDIO_RWEBAUDIO:
|
case AUDIO_RWEBAUDIO:
|
||||||
|
|
|
@ -240,13 +240,15 @@ static void frontend_ctr_exec(const char* path, bool should_load_game)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RARCH_LOG("\n");
|
RARCH_WARN("\n");
|
||||||
RARCH_LOG("\n");
|
RARCH_WARN("\n");
|
||||||
RARCH_LOG("Warning:\n");
|
RARCH_WARN("Warning:\n");
|
||||||
RARCH_LOG("First core launch may take 20 seconds!\n");
|
RARCH_WARN("First core launch may take 20\n");
|
||||||
RARCH_LOG("Do not force quit before then or your memory card may be corrupted!\n");
|
RARCH_WARN("seconds! Do not force quit\n");
|
||||||
RARCH_LOG("\n");
|
RARCH_WARN("before then or your memory\n");
|
||||||
RARCH_LOG("\n");
|
RARCH_WARN("card may be corrupted!\n");
|
||||||
|
RARCH_WARN("\n");
|
||||||
|
RARCH_WARN("\n");
|
||||||
exec_cia(path, arg_data);
|
exec_cia(path, arg_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,6 +358,17 @@ static void ctr_check_dspfirm(void)
|
||||||
}
|
}
|
||||||
fclose(code_fp);
|
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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -315,7 +315,14 @@ bool egl_init_context(egl_ctx_data_t *egl,
|
||||||
EGLint *major, EGLint *minor,
|
EGLint *major, EGLint *minor,
|
||||||
EGLint *n, const EGLint *attrib_ptr)
|
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)
|
if (dpy == EGL_NO_DISPLAY)
|
||||||
{
|
{
|
||||||
RARCH_ERR("[EGL]: Couldn't get EGL display.\n");
|
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);
|
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)
|
if (!eglChooseConfig(egl->dpy, attrib_ptr, &egl->config, 1, n) || *n != 1)
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
egl->major = g_egl_major;
|
egl->major = g_egl_major;
|
||||||
egl->minor = g_egl_minor;
|
egl->minor = g_egl_minor;
|
||||||
|
|
|
@ -622,18 +622,24 @@ static LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message,
|
||||||
static void win32_set_position_from_config(void)
|
static void win32_set_position_from_config(void)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
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)
|
if (!settings->bools.video_window_save_positions)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_win32_pos_x = settings->uints.window_position_x;
|
g_win32_pos_x = settings->uints.window_position_x;
|
||||||
g_win32_pos_y = settings->uints.window_position_y;
|
g_win32_pos_y = settings->uints.window_position_y;
|
||||||
g_win32_pos_width = settings->uints.window_position_width;
|
g_win32_pos_width = settings->uints.window_position_width + border_thickness * 2;
|
||||||
g_win32_pos_height= settings->uints.window_position_height;
|
g_win32_pos_height= settings->uints.window_position_height + border_thickness * 2 + title_bar_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void win32_save_position(void)
|
static void win32_save_position(void)
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT rect;
|
||||||
|
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||||
|
int title_bar_height = GetSystemMetrics(SM_CYCAPTION);
|
||||||
|
int menu_bar_height = GetSystemMetrics(SM_CYMENU);
|
||||||
WINDOWPLACEMENT placement;
|
WINDOWPLACEMENT placement;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
memset(&placement, 0, sizeof(placement));
|
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_x = g_win32_pos_x;
|
||||||
settings->uints.window_position_y = g_win32_pos_y;
|
settings->uints.window_position_y = g_win32_pos_y;
|
||||||
settings->uints.window_position_width = g_win32_pos_width;
|
settings->uints.window_position_width = g_win32_pos_width - border_thickness * 2;
|
||||||
settings->uints.window_position_height = g_win32_pos_height;
|
settings->uints.window_position_height = g_win32_pos_height - border_thickness * 2 - title_bar_height - (settings->bools.ui_menubar_enable ? menu_bar_height : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include "../../driver.h"
|
#include "../../driver.h"
|
||||||
#include "../../configuration.h"
|
#include "../../configuration.h"
|
||||||
|
#include "../../retroarch.h"
|
||||||
#include "../../verbosity.h"
|
#include "../../verbosity.h"
|
||||||
#include "../../frontend/frontend_driver.h"
|
#include "../../frontend/frontend_driver.h"
|
||||||
#include "../common/sixel_common.h"
|
#include "../common/sixel_common.h"
|
||||||
|
|
Loading…
Reference in New Issue