mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
Merge branch 'master' of github.com:libretro/RetroArch into eq-dsp
Conflicts: griffin/griffin.c
This commit is contained in:
commit
0c83bf7d0b
@ -12,7 +12,7 @@ RMENU_IMG_DIR := media/rmenu
|
||||
DOWNLOAD_SHADERS = 1
|
||||
STRIPPING_ENABLE = 0
|
||||
DEBUG = 0
|
||||
HAVE_GCMGL = 1
|
||||
HAVE_GCMGL = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_RLAUNCH = 0
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#define phaserlfoshape 4.0
|
||||
#define lfoskipsamples 20
|
||||
#define phaserlfoskipsamples 20
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926535897932384626433832795
|
||||
@ -67,7 +67,7 @@ static void phaser_process(void *data, struct dspfilter_output *output,
|
||||
for (c = 0; c < 2; c++)
|
||||
m[c] = in[c] + ph->fbout[c] * ph->fb * 0.01f;
|
||||
|
||||
if ((ph->skipcount++ % lfoskipsamples) == 0)
|
||||
if ((ph->skipcount++ % phaserlfoskipsamples) == 0)
|
||||
{
|
||||
ph->gain = 0.5 * (1.0 + cos(ph->skipcount * ph->lfoskip + ph->phase));
|
||||
ph->gain = (exp(ph->gain * phaserlfoshape) - 1.0) / (exp(phaserlfoshape) - 1);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define lfoskipsamples 30
|
||||
#define wahwahlfoskipsamples 30
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926535897932384626433832795
|
||||
@ -59,7 +59,7 @@ static void wahwah_process(void *data, struct dspfilter_output *output,
|
||||
{
|
||||
float in[2] = { out[0], out[1] };
|
||||
|
||||
if ((wah->skipcount++ % lfoskipsamples) == 0)
|
||||
if ((wah->skipcount++ % wahwahlfoskipsamples) == 0)
|
||||
{
|
||||
float frequency = (1.0 + cos(wah->skipcount * wah->lfoskip + wah->phase)) / 2.0;
|
||||
frequency = frequency * wah->depth * (1.0 - wah->freqofs) + wah->freqofs;
|
||||
|
13
config.def.h
13
config.def.h
@ -99,6 +99,11 @@ enum
|
||||
|
||||
OSK_PS3,
|
||||
OSK_NULL,
|
||||
|
||||
MENU_RGUI,
|
||||
MENU_RMENU,
|
||||
MENU_RMENU_XUI,
|
||||
MENU_LAKKA,
|
||||
};
|
||||
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(__CELLOS_LV2__)
|
||||
@ -233,6 +238,14 @@ enum
|
||||
#define OSK_DEFAULT_DRIVER OSK_NULL
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_RMENU)
|
||||
#define MENU_DEFAULT_DRIVER MENU_RMENU
|
||||
#elif defined(HAVE_RMENU_XUI)
|
||||
#define MENU_DEFAULT_DRIVER MENU_RMENU_XUI
|
||||
#else
|
||||
#define MENU_DEFAULT_DRIVER MENU_RGUI
|
||||
#endif
|
||||
|
||||
#if defined(XENON) || defined(_XBOX360) || defined(__CELLOS_LV2__)
|
||||
#define DEFAULT_ASPECT_RATIO 1.7778f
|
||||
#elif defined(_XBOX1) || defined(GEKKO) || defined(ANDROID) || defined(__QNX__)
|
||||
|
@ -76,7 +76,7 @@ void find_next_menu_driver(void)
|
||||
RARCH_WARN("Couldn't find any next menu driver (current one: \"%s\").\n", g_settings.menu.driver);
|
||||
}
|
||||
|
||||
static void find_menu_driver(void)
|
||||
void find_menu_driver(void)
|
||||
{
|
||||
int i = find_menu_driver_index(g_settings.menu.driver);
|
||||
if (i >= 0)
|
||||
|
4
driver.c
4
driver.c
@ -511,6 +511,7 @@ void global_init_drivers(void)
|
||||
{
|
||||
find_audio_driver();
|
||||
find_input_driver();
|
||||
find_image_driver();
|
||||
#ifdef HAVE_MENU
|
||||
find_menu_driver();
|
||||
#endif
|
||||
@ -575,6 +576,9 @@ void init_drivers(void)
|
||||
driver.osk_data_own = !driver.osk_data;
|
||||
#endif
|
||||
|
||||
if (!driver.image)
|
||||
find_image_driver();
|
||||
|
||||
adjust_system_rates();
|
||||
|
||||
g_extern.frame_count = 0;
|
||||
|
1
driver.h
1
driver.h
@ -626,6 +626,7 @@ void driver_location_set_interval(unsigned interval_msecs, unsigned interval_dis
|
||||
const void *menu_ctx_find_driver(const char *ident); // Finds driver with ident. Does not initialize.
|
||||
void find_prev_menu_driver(void);
|
||||
void find_next_menu_driver(void);
|
||||
void find_menu_driver(void);
|
||||
#endif
|
||||
|
||||
// Used by RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO
|
||||
|
@ -373,8 +373,20 @@ returntype main_entry(signature())
|
||||
|
||||
if (!driver.menu)
|
||||
{
|
||||
RARCH_ERR("Couldn't initialize menu, exiting...\n");
|
||||
returnfunc();
|
||||
RARCH_ERR("Couldn't initialize menu.\n");
|
||||
|
||||
if (!driver.menu_ctx)
|
||||
{
|
||||
RARCH_WARN("Trying to bring up menu context interface.\n");
|
||||
find_menu_driver();
|
||||
}
|
||||
|
||||
if (!(driver.menu = (rgui_handle_t*)menu_init()))
|
||||
{
|
||||
RARCH_ERR("Couldn't initialize menu (2nd attempt).\n");
|
||||
rarch_fail(1, "main_entry()");
|
||||
returnfunc();
|
||||
}
|
||||
}
|
||||
|
||||
if (driver.frontend_ctx && driver.frontend_ctx->process_args)
|
||||
|
@ -1118,10 +1118,10 @@ static void lakka_init_items(int i, menu_category_t *category, core_info_t *info
|
||||
menu_item_t *item;
|
||||
|
||||
n = category->num_items;
|
||||
item = (menu_item_t*)&category->items[n];
|
||||
|
||||
category->num_items++;
|
||||
category->items = (menu_item_t*)realloc(category->items, category->num_items * sizeof(menu_item_t));
|
||||
item = (menu_item_t*)&category->items[n];
|
||||
|
||||
strlcpy(item->name, path_basename(list->elems[j].data), sizeof(item->name));
|
||||
strlcpy(item->rom, list->elems[j].data, sizeof(item->rom));
|
||||
|
@ -454,6 +454,9 @@ static void *rmenu_init(void)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)calloc(1, sizeof(*rgui));
|
||||
|
||||
if (!rgui)
|
||||
return NULL;
|
||||
|
||||
rmenu_init_assets(rgui);
|
||||
|
||||
return rgui;
|
||||
|
@ -155,11 +155,9 @@ static void* rmenu_xui_init(void)
|
||||
HRESULT hr;
|
||||
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)calloc(1, sizeof(*rgui));
|
||||
if (rgui == NULL)
|
||||
{
|
||||
RARCH_ERR("Could not allocate RGUI handle.\n");
|
||||
|
||||
if (!rgui)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
d3d_video_t *d3d= (d3d_video_t*)driver.video_data;
|
||||
|
||||
|
@ -316,16 +316,29 @@ void *menu_init(void)
|
||||
{
|
||||
rgui_handle_t *rgui;
|
||||
|
||||
if (!driver.menu_ctx)
|
||||
return NULL;
|
||||
rgui = NULL;
|
||||
|
||||
rgui = (rgui_handle_t*)driver.menu_ctx->init();
|
||||
if (!driver.menu_ctx)
|
||||
{
|
||||
RARCH_ERR("menu_init() - menu context interface not initialized.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!driver.image)
|
||||
{
|
||||
RARCH_ERR("Image driver not initialized.\n");
|
||||
RARCH_WARN("Trying to bring up image driver interface.\n");
|
||||
find_image_driver();
|
||||
|
||||
if (!driver.image)
|
||||
RARCH_ERR("Still couldn't initialize image driver.\n");
|
||||
}
|
||||
|
||||
if (driver.menu_ctx->init)
|
||||
rgui = (rgui_handle_t*)driver.menu_ctx->init();
|
||||
|
||||
if (!rgui)
|
||||
{
|
||||
RARCH_ERR("Could not initialize menu.\n");
|
||||
rarch_fail(1, "menu_init()");
|
||||
}
|
||||
return NULL;
|
||||
|
||||
strlcpy(g_settings.menu.driver, driver.menu_ctx->ident, sizeof(g_settings.menu.driver));
|
||||
|
||||
|
24
gfx/gl.c
24
gfx/gl.c
@ -196,15 +196,13 @@ static bool check_fbo_proc(gl_t *gl)
|
||||
#else
|
||||
#define check_fbo_proc(gl) (true)
|
||||
#endif
|
||||
#if defined(__APPLE__) || defined(HAVE_PSGL)
|
||||
#define GL_RGBA32F GL_RGBA32F_ARB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
////////////////// Shaders
|
||||
|
||||
static bool gl_shader_init(void *data)
|
||||
{
|
||||
bool ret;
|
||||
gl_t *gl = (gl_t*)data;
|
||||
const gl_shader_backend_t *backend = NULL;
|
||||
|
||||
@ -214,6 +212,8 @@ static bool gl_shader_init(void *data)
|
||||
enum rarch_shader_type type = gfx_shader_parse_type(shader_path,
|
||||
gl->core_context ? RARCH_SHADER_GLSL : DEFAULT_SHADER_TYPE);
|
||||
|
||||
ret = 0;
|
||||
|
||||
if (type == RARCH_SHADER_NONE)
|
||||
{
|
||||
RARCH_LOG("[GL]: Not loading any shader.\n");
|
||||
@ -256,7 +256,10 @@ static bool gl_shader_init(void *data)
|
||||
#endif
|
||||
|
||||
gl->shader = backend;
|
||||
bool ret = gl->shader->init(gl, shader_path);
|
||||
|
||||
if (gl->shader && gl->shader->init)
|
||||
ret = gl->shader->init(gl, shader_path);
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
RARCH_ERR("[GL]: Failed to init shader, falling back to stock.\n");
|
||||
@ -270,6 +273,9 @@ static inline void gl_shader_deinit(void *data)
|
||||
{
|
||||
gl_t *gl = (gl_t*)data;
|
||||
|
||||
if (!gl)
|
||||
return;
|
||||
|
||||
if (gl->shader)
|
||||
gl->shader->deinit();
|
||||
gl->shader = NULL;
|
||||
@ -295,7 +301,7 @@ static void gl_set_coords(const struct gl_coords *coords)
|
||||
|
||||
static void gl_disable_client_arrays(gl_t *gl)
|
||||
{
|
||||
if (gl->core_context)
|
||||
if (!gl || gl->core_context)
|
||||
return;
|
||||
|
||||
glClientActiveTexture(GL_TEXTURE1);
|
||||
@ -516,7 +522,7 @@ static void gl_create_fbo_textures(void *data)
|
||||
RARCH_ERR("[GL]: Floating-point FBO was requested, but is not supported. Falling back to UNORM.\n");
|
||||
}
|
||||
|
||||
#ifndef HAVE_PSGL
|
||||
#ifndef HAVE_OPENGLES
|
||||
if (srgb_fbo && gl->has_srgb_fbo)
|
||||
{
|
||||
RARCH_LOG("[GL]: FBO pass #%d is sRGB.\n", i);
|
||||
@ -735,7 +741,7 @@ static bool gl_init_hw_render(gl_t *gl, unsigned width, unsigned height)
|
||||
|
||||
if (stencil)
|
||||
{
|
||||
#if defined(HAVE_OPENGLES2) || defined(OSX_PPC)
|
||||
#if defined(HAVE_OPENGLES2) || defined(HAVE_OPENGLES1) || defined(OSX_PPC)
|
||||
// GLES2 is a bit weird, as always. :P
|
||||
// There's no GL_DEPTH_STENCIL_ATTACHMENT like in desktop GL.
|
||||
glFramebufferRenderbuffer(RARCH_GL_FRAMEBUFFER, RARCH_GL_DEPTH_ATTACHMENT,
|
||||
@ -1826,7 +1832,11 @@ static bool resolve_extensions(gl_t *gl)
|
||||
#else
|
||||
#ifdef HAVE_FBO
|
||||
// Float FBO is core in 3.2.
|
||||
#ifdef HAVE_GCMGL
|
||||
gl->has_fp_fbo = false; // FIXME - rewrite GL implementation
|
||||
#else
|
||||
gl->has_fp_fbo = gl->core_context || gl_query_extension(gl, "ARB_texture_float");
|
||||
#endif
|
||||
gl->has_srgb_fbo = gl->core_context || (gl_query_extension(gl, "EXT_texture_sRGB") && gl_query_extension(gl, "ARB_framebuffer_sRGB"));
|
||||
#endif
|
||||
#endif
|
||||
|
@ -86,6 +86,11 @@
|
||||
#define RARCH_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_EXT
|
||||
#define RARCH_GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_EXT
|
||||
#define RARCH_GL_STENCIL_ATTACHMENT GL_STENCIL_ATTACHMENT_EXT
|
||||
#elif defined(HAVE_PSGL) && !defined(HAVE_GCMGL)
|
||||
#define RARCH_GL_RENDERBUFFER GL_RENDERBUFFER_OES
|
||||
#define RARCH_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_SCE
|
||||
#define RARCH_GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_OES
|
||||
#define RARCH_GL_STENCIL_ATTACHMENT GL_STENCIL_ATTACHMENT_OES
|
||||
#else
|
||||
#define RARCH_GL_RENDERBUFFER GL_RENDERBUFFER
|
||||
#define RARCH_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8
|
||||
@ -95,10 +100,24 @@
|
||||
|
||||
#ifdef OSX_PPC
|
||||
#define RARCH_GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE_EXT
|
||||
#elif defined(HAVE_PSGL) && !defined(HAVE_GCMGL)
|
||||
#define RARCH_GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE_OES
|
||||
#else
|
||||
#define RARCH_GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_PSGL) && !defined(HAVE_GCMGL)
|
||||
#define glGenerateMipmap glGenerateMipmapOES
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FBO
|
||||
|
||||
#if defined(__APPLE__) || defined(HAVE_PSGL)
|
||||
#define GL_RGBA32F GL_RGBA32F_ARB
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
static inline bool gl_check_error(void)
|
||||
{
|
||||
int error = glGetError();
|
||||
|
@ -59,12 +59,16 @@ void find_image_driver(void)
|
||||
else
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_ERR("Couldn't find any image driver named \"%s\"\n", g_settings.image.driver);
|
||||
RARCH_WARN("Couldn't find any image driver named \"%s\"\n", g_settings.image.driver);
|
||||
RARCH_LOG_OUTPUT("Available image drivers are:\n");
|
||||
for (d = 0; image_ctx_drivers[d]; d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", image_ctx_drivers[d]->ident);
|
||||
RARCH_WARN("Going to default to first image driver...\n");
|
||||
|
||||
rarch_fail(1, "find_image_driver()");
|
||||
driver.image = image_ctx_drivers[0];
|
||||
|
||||
if (!driver.image)
|
||||
rarch_fail(1, "find_image_driver()");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -641,10 +641,7 @@ void gfx_shader_write_conf_cgp(config_file_t *conf, const struct gfx_shader *sha
|
||||
config_set_string(conf, "parameters", parameters);
|
||||
|
||||
for (i = 0; i < shader->num_parameters; i++)
|
||||
{
|
||||
char key[64];
|
||||
config_set_float(conf, shader->parameters[i].id, shader->parameters[i].current);
|
||||
}
|
||||
}
|
||||
|
||||
if (shader->luts)
|
||||
|
@ -480,10 +480,13 @@ FILTERS
|
||||
#include "../gfx/filters/lq2x.c"
|
||||
#include "../gfx/filters/phosphor2x.c"
|
||||
|
||||
#include "../audio/filters/panning.c"
|
||||
#include "../audio/filters/iir.c"
|
||||
#include "../audio/filters/echo.c"
|
||||
#include "../audio/filters/eq.c"
|
||||
#include "../audio/filters/iir.c"
|
||||
#include "../audio/filters/panning.c"
|
||||
#include "../audio/filters/phaser.c"
|
||||
#include "../audio/filters/reverb.c"
|
||||
#include "../audio/filters/wahwah.c"
|
||||
#endif
|
||||
/*============================================================
|
||||
DYNAMIC
|
||||
|
BIN
media/lakka/mednafen_pce_fast-content.png
Normal file
BIN
media/lakka/mednafen_pce_fast-content.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
media/lakka/mednafen_pce_fast.png
Normal file
BIN
media/lakka/mednafen_pce_fast.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
26
settings.c
26
settings.c
@ -151,6 +151,25 @@ const char *config_get_default_input(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
const char *config_get_default_menu(void)
|
||||
{
|
||||
switch (MENU_DEFAULT_DRIVER)
|
||||
{
|
||||
case MENU_RGUI:
|
||||
return "rgui";
|
||||
case MENU_RMENU:
|
||||
return "rmenu";
|
||||
case MENU_RMENU_XUI:
|
||||
return "rmenu_xui";
|
||||
case MENU_LAKKA:
|
||||
return "lakka";
|
||||
default:
|
||||
return "NULL";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OSK
|
||||
const char *config_get_default_osk(void)
|
||||
{
|
||||
@ -226,6 +245,9 @@ void config_set_defaults(void)
|
||||
const char *def_image = config_get_default_image();
|
||||
const char *def_audio = config_get_default_audio();
|
||||
const char *def_input = config_get_default_input();
|
||||
#ifdef HAVE_MENU
|
||||
const char *def_menu = config_get_default_menu();
|
||||
#endif
|
||||
#ifdef HAVE_CAMERA
|
||||
const char *def_camera = config_get_default_camera();
|
||||
|
||||
@ -254,6 +276,10 @@ void config_set_defaults(void)
|
||||
strlcpy(g_settings.input.driver, def_input, sizeof(g_settings.input.driver));
|
||||
if (def_image)
|
||||
strlcpy(g_settings.image.driver, def_image, sizeof(g_settings.image.driver));
|
||||
#ifdef HAVE_MENU
|
||||
if (def_menu)
|
||||
strlcpy(g_settings.menu.driver, def_menu, sizeof(g_settings.menu.driver));
|
||||
#endif
|
||||
|
||||
g_settings.load_dummy_on_core_shutdown = load_dummy_on_core_shutdown;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user