Make C++ compiler happy.

This commit is contained in:
Themaister 2014-02-06 22:49:14 +01:00
parent 032ba14d3b
commit 8120198ed8
5 changed files with 17 additions and 8 deletions

View File

@ -411,7 +411,7 @@ static bool gfx_ctx_set_video_mode(
// GLES 2.0+. Don't use for any other API.
const EGLint gles_context_attribs[] = {
EGL_CONTEXT_CLIENT_VERSION, g_major ? g_major : 2,
EGL_CONTEXT_CLIENT_VERSION, g_major ? (EGLint)g_major : 2,
EGL_NONE
};

View File

@ -348,6 +348,12 @@ static bool gfx_ctx_set_video_mode(
int (*old_handler)(Display*, XErrorEvent*) = NULL;
// GLES 2.0+. Don't use for any other API.
const EGLint egl_ctx_gles_attribs[] = {
EGL_CONTEXT_CLIENT_VERSION, g_major ? (EGLint)g_major : 2,
EGL_NONE,
};
EGLint vid;
if (!eglGetConfigAttrib(g_egl_dpy, g_config, EGL_NATIVE_VISUAL_ID, &vid))
goto error;
@ -405,12 +411,6 @@ static bool gfx_ctx_set_video_mode(
CWBorderPixel | CWColormap | CWEventMask | (true_full ? CWOverrideRedirect : 0), &swa);
XSetWindowBackground(g_dpy, g_win, 0);
// GLES 2.0+. Don't use for any other API.
const EGLint egl_ctx_gles_attribs[] = {
EGL_CONTEXT_CLIENT_VERSION, g_major ? g_major : 2,
EGL_NONE,
};
g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, EGL_NO_CONTEXT,
(g_api == GFX_CTX_OPENGL_ES_API) ? egl_ctx_gles_attribs : NULL);

View File

@ -2426,7 +2426,7 @@ static bool gl_read_viewport(void *data, uint8_t *buffer)
gl_frame(gl, NULL, 0, 0, 0, NULL);
uint8_t *dst = buffer;
const uint8_t *src = gl->readback_buffer_screenshot;
const uint8_t *src = (const uint8_t*)gl->readback_buffer_screenshot;
unsigned i;
for (i = 0; i < num_pixels; i++, dst += 3, src += 4)
{

View File

@ -13,5 +13,6 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "git_version.h"
const char rarch_git_version[] = GIT_VERSION;

View File

@ -16,8 +16,16 @@
#ifndef RARCH_VERSION_H__
#define RARCH_VERSION_H__
#ifdef __cplusplus
extern "C" {
#endif
// Put this in a separate file so we don't have to rebuilt retroarch.c every single build.
extern const char rarch_git_version[];
#ifdef __cplusplus
}
#endif
#endif