Skip to content

Commit

Permalink
Make C++ compiler happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Feb 6, 2014
1 parent 032ba14 commit 8120198
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gfx/context/drm_egl_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
12 changes: 6 additions & 6 deletions gfx/context/xegl_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion gfx/gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions git_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
* If not, see <http://www.gnu.org/licenses/>.
*/

#include "git_version.h"
const char rarch_git_version[] = GIT_VERSION;

8 changes: 8 additions & 0 deletions git_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8120198

Please sign in to comment.