mirror of
https://github.com/libretro/RetroArch
synced 2024-12-28 09:29:16 +00:00
Make C++ compiler happy.
This commit is contained in:
parent
032ba14d3b
commit
8120198ed8
@ -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
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
2
gfx/gl.c
2
gfx/gl.c
@ -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)
|
||||
{
|
||||
|
@ -13,5 +13,6 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "git_version.h"
|
||||
const char rarch_git_version[] = GIT_VERSION;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user