Fix CXX_BUILD.

This commit is contained in:
Themaister 2012-10-01 00:11:39 +02:00
parent b954472295
commit b73243b521
2 changed files with 18 additions and 16 deletions

View File

@ -172,18 +172,6 @@ static bool gfx_ctx_init(void)
if (g_inited)
return false;
g_quit = 0;
g_dpy = XOpenDisplay(NULL);
if (!g_dpy)
goto error;
// GLX 1.3+ required.
int major, minor;
glXQueryVersion(g_dpy, &major, &minor);
if (major < 1 || (major == 1 && minor < 3))
goto error;
static const int visual_attribs[] = {
GLX_X_RENDERABLE , True,
GLX_DRAWABLE_TYPE , GLX_WINDOW_BIT,
@ -198,8 +186,22 @@ static bool gfx_ctx_init(void)
None
};
GLXFBConfig *fbcs = NULL;
g_quit = 0;
g_dpy = XOpenDisplay(NULL);
if (!g_dpy)
goto error;
// GLX 1.3+ required.
int major, minor;
glXQueryVersion(g_dpy, &major, &minor);
if (major < 1 || (major == 1 && minor < 3))
goto error;
int nelements;
GLXFBConfig *fbcs = glXChooseFBConfig(g_dpy, DefaultScreen(g_dpy),
fbcs = glXChooseFBConfig(g_dpy, DefaultScreen(g_dpy),
visual_attribs, &nelements);
if (!fbcs)

View File

@ -216,7 +216,7 @@ static void get_binds(config_file_t *conf, int player, int joypad)
rarch_sleep(10);
poll_joypad(driver, joypad, &new_poll);
for (unsigned j = 0; j < MAX_BUTTONS; j++)
for (int j = 0; j < MAX_BUTTONS; j++)
{
if (new_poll.buttons[j] && !old_poll.buttons[j])
{
@ -226,7 +226,7 @@ static void get_binds(config_file_t *conf, int player, int joypad)
}
}
for (unsigned j = 0; j < MAX_AXES; j++)
for (int j = 0; j < MAX_AXES; j++)
{
if (new_poll.axes[j] != old_poll.axes[j])
{
@ -269,7 +269,7 @@ static void get_binds(config_file_t *conf, int player, int joypad)
}
}
for (unsigned j = 0; j < MAX_HATS; j++)
for (int j = 0; j < MAX_HATS; j++)
{
const char *quark = NULL;
uint16_t value = new_poll.hats[j];