Rename g_settings to g_config - to prevent conflicts, had to rename

some static variables in some of the gfx context driver files
This commit is contained in:
twinaphex 2015-03-21 01:15:03 +01:00
parent 5900492aeb
commit 45cf71770e
15 changed files with 82 additions and 83 deletions

View File

@ -438,7 +438,6 @@ static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
#elif defined(RARCH_CONSOLE)
static unsigned aspect_ratio_idx = ASPECT_RATIO_4_3;
#else
/* Use g_settings.video.aspect_ratio. */
static unsigned aspect_ratio_idx = ASPECT_RATIO_CONFIG;
#endif

View File

@ -31,7 +31,7 @@
#include "config.h"
#endif
settings_t g_settings;
settings_t g_config;
struct global g_extern;
struct defaults g_defaults;
@ -1132,9 +1132,9 @@ static bool config_load_file(const char *path, bool set_defaults)
CONFIG_GET_BOOL(menu.navigation.browser.filter.supported_extensions_enable, "menu_navigation_browser_filter_supported_extensions_enable");
CONFIG_GET_BOOL(menu.collapse_subgroups_enable, "menu_collapse_subgroups_enable");
CONFIG_GET_BOOL(menu.show_advanced_settings, "menu_show_advanced_settings");
CONFIG_GET_HEX_BASE(conf, g_settings, menu.entry_normal_color, "menu_entry_normal_color");
CONFIG_GET_HEX_BASE(conf, g_settings, menu.entry_hover_color, "menu_entry_hover_color");
CONFIG_GET_HEX_BASE(conf, g_settings, menu.title_color, "menu_title_color");
CONFIG_GET_HEX_BASE(conf, g_config, menu.entry_normal_color, "menu_entry_normal_color");
CONFIG_GET_HEX_BASE(conf, g_config, menu.entry_hover_color, "menu_entry_hover_color");
CONFIG_GET_HEX_BASE(conf, g_config, menu.title_color, "menu_title_color");
config_get_path(conf, "menu_wallpaper", settings->menu.wallpaper, sizeof(settings->menu.wallpaper));
if (!strcmp(settings->menu.wallpaper, "default"))
*settings->menu.wallpaper = '\0';
@ -2148,5 +2148,5 @@ bool config_save_file(const char *path)
settings_t *config_get_ptr(void)
{
return &g_settings;
return &g_config;
}

View File

@ -410,7 +410,7 @@ bool config_save_file(const char *path);
settings_t *config_get_ptr(void);
/* Public data structures. */
extern settings_t g_settings;
extern settings_t g_config;
#ifdef __cplusplus
}

View File

@ -34,7 +34,7 @@ typedef struct gfx_ctx_android_data
EGLContext g_egl_ctx;
EGLSurface g_egl_surf;
EGLDisplay g_egl_dpy;
EGLConfig g_config;
EGLConfig g_egl_config;
} gfx_ctx_android_data_t;
static bool g_es3;
@ -81,7 +81,7 @@ static void android_gfx_ctx_destroy_resources(gfx_ctx_android_data_t *android)
android->g_egl_hw_ctx = NULL;
android->g_egl_surf = NULL;
android->g_egl_dpy = NULL;
android->g_config = 0;
android->g_egl_config = 0;
}
static void android_gfx_ctx_destroy(void *data)
@ -177,10 +177,10 @@ static bool android_gfx_ctx_init(void *data)
egl_version_major, egl_version_minor);
if (!eglChooseConfig(android->g_egl_dpy,
attribs, &android->g_config, 1, &num_config))
attribs, &android->g_egl_config, 1, &num_config))
goto error;
var = eglGetConfigAttrib(android->g_egl_dpy, android->g_config,
var = eglGetConfigAttrib(android->g_egl_dpy, android->g_egl_config,
EGL_NATIVE_VISUAL_ID, &format);
if (!var)
@ -192,7 +192,7 @@ static bool android_gfx_ctx_init(void *data)
ANativeWindow_setBuffersGeometry(android_app->window, 0, 0, format);
android->g_egl_ctx = eglCreateContext(android->g_egl_dpy,
android->g_config, EGL_NO_CONTEXT, context_attributes);
android->g_egl_config, EGL_NO_CONTEXT, context_attributes);
if (android->g_egl_ctx == EGL_NO_CONTEXT)
goto error;
@ -200,7 +200,7 @@ static bool android_gfx_ctx_init(void *data)
if (android->g_use_hw_ctx)
{
android->g_egl_hw_ctx = eglCreateContext(android->g_egl_dpy,
android->g_config, android->g_egl_ctx,
android->g_egl_config, android->g_egl_ctx,
context_attributes);
RARCH_LOG("[Android/EGL]: Created shared context: %p.\n",
(void*)android->g_egl_hw_ctx);
@ -210,7 +210,7 @@ static bool android_gfx_ctx_init(void *data)
}
android->g_egl_surf = eglCreateWindowSurface(android->g_egl_dpy,
android->g_config, android_app->window, 0);
android->g_egl_config, android_app->window, 0);
if (!android->g_egl_surf)
goto error;

View File

@ -43,7 +43,7 @@ static EGLContext g_egl_hw_ctx;
static EGLContext g_egl_ctx;
static EGLSurface g_egl_surf;
static EGLDisplay g_egl_dpy;
static EGLConfig g_config;
static EGLConfig g_egl_config;
static bool g_resize;
screen_context_t screen_ctx;
@ -84,7 +84,7 @@ static void gfx_ctx_qnx_destroy(void *data)
g_egl_hw_ctx = NULL;
g_egl_surf = NULL;
g_egl_dpy = NULL;
g_config = 0;
g_egl_config = 0;
g_resize = false;
}
@ -176,17 +176,17 @@ static bool gfx_ctx_qnx_init(void *data)
RARCH_LOG("[BLACKBERRY QNX/EGL]: EGL version: %d.%d\n", egl_version_major, egl_version_minor);
if (!eglChooseConfig(g_egl_dpy, attribs, &g_config, 1, &num_config))
if (!eglChooseConfig(g_egl_dpy, attribs, &g_egl_config, 1, &num_config))
goto error;
g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, EGL_NO_CONTEXT, context_attributes);
g_egl_ctx = eglCreateContext(g_egl_dpy, g_egl_config, EGL_NO_CONTEXT, context_attributes);
if (g_egl_ctx == EGL_NO_CONTEXT)
goto error;
if (g_use_hw_ctx)
{
g_egl_hw_ctx = eglCreateContext(g_egl_dpy, g_config, g_egl_ctx,
g_egl_hw_ctx = eglCreateContext(g_egl_dpy, g_egl_config, g_egl_ctx,
context_attributes);
RARCH_LOG("[Android/EGL]: Created shared context: %p.\n", (void*)g_egl_hw_ctx);
@ -291,7 +291,7 @@ static bool gfx_ctx_qnx_init(void *data)
goto error;
}
if (!(g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, screen_win, 0)))
if (!(g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_egl_config, screen_win, 0)))
{
RARCH_ERR("eglCreateWindowSurface failed.\n");
goto error;

View File

@ -75,7 +75,7 @@ typedef struct gfx_ctx_drm_egl_data
EGLContext g_egl_ctx;
EGLSurface g_egl_surf;
EGLDisplay g_egl_dpy;
EGLConfig g_config;
EGLConfig g_egl_config;
struct gbm_device *g_gbm_dev;
struct gbm_surface *g_gbm_surface;
} gfx_ctx_drm_egl_data_t;
@ -360,7 +360,7 @@ static void gfx_ctx_drm_egl_destroy_resources(gfx_ctx_drm_egl_data_t *drm)
drm->g_egl_hw_ctx = NULL;
drm->g_egl_surf = NULL;
drm->g_egl_dpy = NULL;
drm->g_config = 0;
drm->g_egl_config = 0;
/* Restore original CRTC. */
if (drm->g_orig_crtc)
@ -797,12 +797,12 @@ static bool gfx_ctx_drm_egl_set_video_mode(void *data,
if (!eglInitialize(drm->g_egl_dpy, &major, &minor))
goto error;
if (!eglChooseConfig(drm->g_egl_dpy, attrib_ptr, &drm->g_config, 1, &n) || n != 1)
if (!eglChooseConfig(drm->g_egl_dpy, attrib_ptr, &drm->g_egl_config, 1, &n) || n != 1)
goto error;
attr = egl_fill_attribs(egl_attribs);
drm->g_egl_ctx = eglCreateContext(drm->g_egl_dpy, drm->g_config, EGL_NO_CONTEXT,
drm->g_egl_ctx = eglCreateContext(drm->g_egl_dpy, drm->g_egl_config, EGL_NO_CONTEXT,
attr != egl_attribs ? egl_attribs : NULL);
if (drm->g_egl_ctx == EGL_NO_CONTEXT)
@ -810,7 +810,7 @@ static bool gfx_ctx_drm_egl_set_video_mode(void *data,
if (drm->g_use_hw_ctx)
{
drm->g_egl_hw_ctx = eglCreateContext(drm->g_egl_dpy, drm->g_config, drm->g_egl_ctx,
drm->g_egl_hw_ctx = eglCreateContext(drm->g_egl_dpy, drm->g_egl_config, drm->g_egl_ctx,
attr != egl_attribs ? egl_attribs : NULL);
RARCH_LOG("[KMS/EGL]: Created shared context: %p.\n", (void*)drm->g_egl_hw_ctx);
@ -819,7 +819,7 @@ static bool gfx_ctx_drm_egl_set_video_mode(void *data,
}
drm->g_egl_surf = eglCreateWindowSurface(drm->g_egl_dpy,
drm->g_config, (EGLNativeWindowType)drm->g_gbm_surface, NULL);
drm->g_egl_config, (EGLNativeWindowType)drm->g_gbm_surface, NULL);
if (!drm->g_egl_surf)
goto error;

View File

@ -34,7 +34,7 @@
static EGLContext g_egl_ctx;
static EGLSurface g_egl_surf;
static EGLDisplay g_egl_dpy;
static EGLConfig g_config;
static EGLConfig g_egl_config;
static bool g_inited;
@ -145,16 +145,16 @@ static bool gfx_ctx_emscripten_init(void *data)
goto error;
/* Get an appropriate EGL frame buffer configuration. */
if (!eglChooseConfig(g_egl_dpy, attribute_list, &g_config, 1, &num_config))
if (!eglChooseConfig(g_egl_dpy, attribute_list, &g_egl_config, 1, &num_config))
goto error;
/* Create an EGL rendering context. */
g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, EGL_NO_CONTEXT, context_attributes);
g_egl_ctx = eglCreateContext(g_egl_dpy, g_egl_config, EGL_NO_CONTEXT, context_attributes);
if (!g_egl_ctx)
goto error;
/* create an EGL window surface. */
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, 0, NULL);
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_egl_config, 0, NULL);
if (!g_egl_surf)
goto error;
@ -225,7 +225,7 @@ static void gfx_ctx_emscripten_destroy(void *data)
g_egl_ctx = NULL;
g_egl_surf = NULL;
g_egl_dpy = NULL;
g_config = 0;
g_egl_config = 0;
g_inited = false;
}

View File

@ -33,7 +33,7 @@ struct fbdev_window native_window;
static EGLContext g_egl_ctx;
static EGLSurface g_egl_surf;
static EGLDisplay g_egl_dpy;
static EGLConfig g_config;
static EGLConfig g_egl_config;
static bool g_resize;
static unsigned g_width, g_height;
@ -72,12 +72,12 @@ static void gfx_ctx_mali_fbdev_destroy(void *data)
eglTerminate(g_egl_dpy);
}
g_egl_dpy = EGL_NO_DISPLAY;
g_egl_surf = EGL_NO_SURFACE;
g_egl_ctx = EGL_NO_CONTEXT;
g_config = 0;
g_quit = 0;
g_resize = false;
g_egl_dpy = EGL_NO_DISPLAY;
g_egl_surf = EGL_NO_SURFACE;
g_egl_ctx = EGL_NO_CONTEXT;
g_egl_config = 0;
g_quit = 0;
g_resize = false;
/* Clear framebuffer and set cursor on again */
int fd = open("/dev/tty", O_RDWR);
@ -148,7 +148,7 @@ static bool gfx_ctx_mali_fbdev_init(void *data)
RARCH_LOG("[Mali fbdev]: EGL version: %d.%d\n", egl_version_major, egl_version_minor);
if (!eglChooseConfig(g_egl_dpy, attribs, &g_config, 1, &num_config))
if (!eglChooseConfig(g_egl_dpy, attribs, &g_egl_config, 1, &num_config))
{
RARCH_ERR("[Mali fbdev]: eglChooseConfig failed.\n");
goto error;
@ -236,13 +236,13 @@ static bool gfx_ctx_mali_fbdev_set_video_mode(void *data,
native_window.width = vinfo.xres;
native_window.height = vinfo.yres;
if ((g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, &native_window, 0)) == EGL_NO_SURFACE)
if ((g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_egl_config, &native_window, 0)) == EGL_NO_SURFACE)
{
RARCH_ERR("eglCreateWindowSurface failed.\n");
goto error;
}
if ((g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, 0, attribs)) == EGL_NO_CONTEXT)
if ((g_egl_ctx = eglCreateContext(g_egl_dpy, g_egl_config, 0, attribs)) == EGL_NO_CONTEXT)
{
RARCH_ERR("eglCreateContext failed.\n");
goto error;

View File

@ -42,7 +42,7 @@ static EGLContext g_egl_hw_ctx;
static EGLContext g_egl_ctx;
static EGLSurface g_egl_surf;
static EGLDisplay g_egl_dpy;
static EGLConfig g_config;
static EGLConfig g_egl_config;
static volatile sig_atomic_t g_quit;
static bool g_inited;
@ -214,19 +214,19 @@ static bool gfx_ctx_vc_init(void *data)
goto error;
/* Get an appropriate EGL frame buffer configuration. */
if (!eglChooseConfig(g_egl_dpy, attribute_list, &g_config, 1, &num_config))
if (!eglChooseConfig(g_egl_dpy, attribute_list, &g_egl_config, 1, &num_config))
goto error;
/* Create an EGL rendering context. */
g_egl_ctx = eglCreateContext(
g_egl_dpy, g_config, EGL_NO_CONTEXT,
g_egl_dpy, g_egl_config, EGL_NO_CONTEXT,
(g_api == GFX_CTX_OPENGL_ES_API) ? context_attributes : NULL);
if (!g_egl_ctx)
goto error;
if (g_use_hw_ctx)
{
g_egl_hw_ctx = eglCreateContext(g_egl_dpy, g_config, g_egl_ctx,
g_egl_hw_ctx = eglCreateContext(g_egl_dpy, g_egl_config, g_egl_ctx,
context_attributes);
RARCH_LOG("[VC/EGL]: Created shared context: %p.\n", (void*)g_egl_hw_ctx);
@ -307,7 +307,7 @@ static bool gfx_ctx_vc_init(void *data)
}
vc_dispmanx_update_submit_sync(dispman_update);
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, &nativewindow, NULL);
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_egl_config, &nativewindow, NULL);
if (!g_egl_surf)
goto error;
@ -438,7 +438,7 @@ static void gfx_ctx_vc_destroy(void *data)
g_egl_surf = NULL;
g_pbuff_surf = NULL;
g_egl_dpy = NULL;
g_config = 0;
g_egl_config = 0;
g_inited = false;
for (i = 0; i < MAX_EGLIMAGE_TEXTURES; i++)
@ -519,14 +519,14 @@ static bool gfx_ctx_vc_init_egl_image_buffer(void *data,
g_egl_res = video->input_scale * RARCH_SCALE_BASE;
eglBindAPI(EGL_OPENVG_API);
g_pbuff_surf = eglCreatePbufferSurface(g_egl_dpy, g_config, pbufsurface_list);
g_pbuff_surf = eglCreatePbufferSurface(g_egl_dpy, g_egl_config, pbufsurface_list);
if (g_pbuff_surf == EGL_NO_SURFACE)
{
RARCH_ERR("[VideoCore:EGLImage] failed to create PbufferSurface\n");
goto fail;
}
g_eglimage_ctx = eglCreateContext(g_egl_dpy, g_config, NULL, NULL);
g_eglimage_ctx = eglCreateContext(g_egl_dpy, g_egl_config, NULL, NULL);
if (g_eglimage_ctx == EGL_NO_CONTEXT)
{
RARCH_ERR("[VideoCore:EGLImage] failed to create context\n");

View File

@ -26,7 +26,7 @@
static EGLContext g_egl_ctx;
static EGLSurface g_egl_surf;
static EGLDisplay g_egl_dpy;
static EGLConfig g_config;
static EGLConfig g_egl_config;
static bool g_resize;
static unsigned g_width, g_height;
@ -67,12 +67,12 @@ static void gfx_ctx_vivante_destroy(void *data)
eglTerminate(g_egl_dpy);
}
g_egl_dpy = EGL_NO_DISPLAY;
g_egl_surf = EGL_NO_SURFACE;
g_egl_ctx = EGL_NO_CONTEXT;
g_config = 0;
g_quit = 0;
g_resize = false;
g_egl_dpy = EGL_NO_DISPLAY;
g_egl_surf = EGL_NO_SURFACE;
g_egl_ctx = EGL_NO_CONTEXT;
g_egl_config = 0;
g_quit = 0;
g_resize = false;
}
static void gfx_ctx_vivante_get_video_size(void *data,
@ -138,7 +138,7 @@ static bool gfx_ctx_vivante_init(void *data)
RARCH_LOG("[Vivante fbdev]: EGL version: %d.%d\n",
egl_version_major, egl_version_minor);
if (!eglChooseConfig(g_egl_dpy, attribs, &g_config, 1, &num_config))
if (!eglChooseConfig(g_egl_dpy, attribs, &g_egl_config, 1, &num_config))
{
RARCH_ERR("[Vivante fbdev]: eglChooseConfig failed.\n");
goto error;
@ -218,7 +218,7 @@ static bool gfx_ctx_vivante_set_video_mode(void *data,
g_height = height;
window = fbCreateWindow(fbGetDisplayByIndex(0), 0, 0, 0, 0);
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, window, 0);
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_egl_config, window, 0);
if (g_egl_surf == EGL_NO_SURFACE)
{
@ -226,7 +226,7 @@ static bool gfx_ctx_vivante_set_video_mode(void *data,
goto error;
}
g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, 0, attribs);
g_egl_ctx = eglCreateContext(g_egl_dpy, g_egl_config, 0, attribs);
if (g_egl_ctx == EGL_NO_CONTEXT)
{
RARCH_ERR("eglCreateContext failed.\n");

View File

@ -35,7 +35,7 @@ typedef struct gfx_ctx_wayland_data
EGLContext g_egl_hw_ctx;
EGLSurface g_egl_surf;
EGLDisplay g_egl_dpy;
EGLConfig g_config;
EGLConfig g_egl_config;
bool g_resize;
bool g_use_hw_ctx;
int g_fd;
@ -172,7 +172,7 @@ static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl)
wl->g_egl_hw_ctx = NULL;
wl->g_egl_surf = NULL;
wl->g_egl_dpy = NULL;
wl->g_config = 0;
wl->g_egl_config = 0;
if (wl->g_win)
wl_egl_window_destroy(wl->g_win);
@ -483,13 +483,13 @@ static bool gfx_ctx_wl_init(void *data)
RARCH_LOG("[Wayland/EGL]: EGL version: %d.%d\n", egl_major, egl_minor);
if (!eglChooseConfig(wl->g_egl_dpy, attrib_ptr, &wl->g_config, 1, &num_configs))
if (!eglChooseConfig(wl->g_egl_dpy, attrib_ptr, &wl->g_egl_config, 1, &num_configs))
{
RARCH_ERR("[Wayland/EGL]: eglChooseConfig failed with 0x%x.\n", eglGetError());
goto error;
}
if (num_configs == 0 || !wl->g_config)
if (num_configs == 0 || !wl->g_egl_config)
{
RARCH_ERR("[Wayland/EGL]: No EGL configurations available.\n");
goto error;
@ -619,7 +619,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data,
wl_shell_surface_set_class(wl->g_shell_surf, "RetroArch");
wl_shell_surface_set_title(wl->g_shell_surf, "RetroArch");
wl->g_egl_ctx = eglCreateContext(wl->g_egl_dpy, wl->g_config, EGL_NO_CONTEXT,
wl->g_egl_ctx = eglCreateContext(wl->g_egl_dpy, wl->g_egl_config, EGL_NO_CONTEXT,
attr != egl_attribs ? egl_attribs : NULL);
RARCH_LOG("[Wayland/EGL]: Created context: %p.\n", (void*)wl->g_egl_ctx);
@ -628,7 +628,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data,
if (wl->g_use_hw_ctx)
{
wl->g_egl_hw_ctx = eglCreateContext(wl->g_egl_dpy, wl->g_config, wl->g_egl_ctx,
wl->g_egl_hw_ctx = eglCreateContext(wl->g_egl_dpy, wl->g_egl_config, wl->g_egl_ctx,
attr != egl_attribs ? egl_attribs : NULL);
RARCH_LOG("[Wayland/EGL]: Created shared context: %p.\n", (void*)wl->g_egl_hw_ctx);
@ -636,7 +636,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data,
goto error;
}
wl->g_egl_surf = eglCreateWindowSurface(wl->g_egl_dpy, wl->g_config,
wl->g_egl_surf = eglCreateWindowSurface(wl->g_egl_dpy, wl->g_egl_config,
(EGLNativeWindowType)wl->g_win, NULL);
if (!wl->g_egl_surf)
goto error;

View File

@ -51,7 +51,7 @@ static EGLContext g_egl_hw_ctx;
static EGLContext g_egl_ctx;
static EGLSurface g_egl_surf;
static EGLDisplay g_egl_dpy;
static EGLConfig g_config;
static EGLConfig g_egl_config;
static XF86VidModeModeInfo g_desktop_mode;
static bool g_should_reset_mode;
@ -357,13 +357,13 @@ static bool gfx_ctx_xegl_init(void *data)
RARCH_LOG("[X/EGL]: EGL version: %d.%d\n", egl_major, egl_minor);
EGLint num_configs;
if (!eglChooseConfig(g_egl_dpy, attrib_ptr, &g_config, 1, &num_configs))
if (!eglChooseConfig(g_egl_dpy, attrib_ptr, &g_egl_config, 1, &num_configs))
{
RARCH_ERR("[X/EGL]: eglChooseConfig failed with 0x%x.\n", eglGetError());
goto error;
}
if (num_configs == 0 || !g_config)
if (num_configs == 0 || !g_egl_config)
{
RARCH_ERR("[X/EGL]: No EGL configurations available.\n");
goto error;
@ -472,7 +472,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data,
attr = egl_attribs;
attr = xegl_fill_attribs(attr);
if (!eglGetConfigAttrib(g_egl_dpy, g_config, EGL_NATIVE_VISUAL_ID, &vid))
if (!eglGetConfigAttrib(g_egl_dpy, g_egl_config, EGL_NATIVE_VISUAL_ID, &vid))
goto error;
temp.visualid = vid;
@ -528,7 +528,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data,
CWBorderPixel | CWColormap | CWEventMask | (true_full ? CWOverrideRedirect : 0), &swa);
XSetWindowBackground(g_dpy, g_win, 0);
g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, EGL_NO_CONTEXT,
g_egl_ctx = eglCreateContext(g_egl_dpy, g_egl_config, EGL_NO_CONTEXT,
attr != egl_attribs ? egl_attribs : NULL);
RARCH_LOG("[X/EGL]: Created context: %p.\n", (void*)g_egl_ctx);
@ -538,7 +538,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data,
if (g_use_hw_ctx)
{
g_egl_hw_ctx = eglCreateContext(g_egl_dpy, g_config, g_egl_ctx,
g_egl_hw_ctx = eglCreateContext(g_egl_dpy, g_egl_config, g_egl_ctx,
attr != egl_attribs ? egl_attribs : NULL);
RARCH_LOG("[X/EGL]: Created shared context: %p.\n", (void*)g_egl_hw_ctx);
@ -546,7 +546,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data,
goto error;
}
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, (EGLNativeWindowType)g_win, NULL);
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_egl_config, (EGLNativeWindowType)g_win, NULL);
if (!g_egl_surf)
goto error;
@ -659,7 +659,7 @@ static void gfx_ctx_xegl_destroy(void *data)
g_egl_hw_ctx = NULL;
g_egl_surf = NULL;
g_egl_dpy = NULL;
g_config = 0;
g_egl_config = 0;
if (g_win)
{

View File

@ -62,11 +62,11 @@
#define CONFIG_GET_PATH_BASE(conf, base, var, key) \
config_get_path(conf, key, base.var, sizeof(base.var))
#define CONFIG_GET_BOOL(var, key) CONFIG_GET_BOOL_BASE(conf, g_settings, var, key)
#define CONFIG_GET_INT(var, key) CONFIG_GET_INT_BASE(conf, g_settings, var, key)
#define CONFIG_GET_FLOAT(var, key) CONFIG_GET_FLOAT_BASE(conf, g_settings, var, key)
#define CONFIG_GET_STRING(var, key) CONFIG_GET_STRING_BASE(conf, g_settings, var, key)
#define CONFIG_GET_PATH(var, key) CONFIG_GET_PATH_BASE(conf, g_settings, var, key)
#define CONFIG_GET_BOOL(var, key) CONFIG_GET_BOOL_BASE(conf, g_config, var, key)
#define CONFIG_GET_INT(var, key) CONFIG_GET_INT_BASE(conf, g_config, var, key)
#define CONFIG_GET_FLOAT(var, key) CONFIG_GET_FLOAT_BASE(conf, g_config, var, key)
#define CONFIG_GET_STRING(var, key) CONFIG_GET_STRING_BASE(conf, g_config, var, key)
#define CONFIG_GET_PATH(var, key) CONFIG_GET_PATH_BASE(conf, g_config, var, key)
#define CONFIG_GET_BOOL_EXTERN(var, key) CONFIG_GET_BOOL_BASE(conf, g_extern, var, key)
#define CONFIG_GET_INT_EXTERN(var, key) CONFIG_GET_INT_BASE(conf, g_extern, var, key)

View File

@ -1673,7 +1673,7 @@ static void main_clear_state(bool inited)
{
unsigned i;
memset(&g_settings, 0, sizeof(g_settings));
memset(&g_config, 0, sizeof(g_config));
if (inited)
rarch_main_command(RARCH_CMD_DRIVERS_DEINIT);
@ -1686,7 +1686,7 @@ static void main_clear_state(bool inited)
init_state();
for (i = 0; i < MAX_USERS; i++)
g_settings.input.libretro_device[i] = RETRO_DEVICE_JOYPAD;
g_config.input.libretro_device[i] = RETRO_DEVICE_JOYPAD;
}
void rarch_main_state_new(void)

View File

@ -33,7 +33,7 @@
* Better than having to build special versions of lots of objects
* with special #ifdefs.
*/
struct settings g_settings;
struct settings g_config;
struct global g_extern;
driver_t driver;
@ -48,7 +48,7 @@ static unsigned g_meta_level = 0;
settings_t *config_get_ptr(void)
{
return &g_settings;
return &g_config;
}
driver_t *driver_get_ptr(void)