Fix CXX_BUILD.

This commit is contained in:
Themaister 2012-10-21 23:24:25 +02:00
parent 668ff7687e
commit a79ca54bc7
5 changed files with 17 additions and 14 deletions

View File

@ -457,6 +457,13 @@ static void init_filter(bool rgb32)
return; return;
} }
struct retro_game_geometry *geom = &g_extern.system.av_info.geometry;
unsigned width = geom->max_width;
unsigned height = geom->max_height;
unsigned pow2_x = 0;
unsigned pow2_y = 0;
unsigned maxsize = 0;
g_extern.filter.psize = g_extern.filter.psize =
(void (*)(unsigned*, unsigned*))dylib_proc(g_extern.filter.lib, "filter_size"); (void (*)(unsigned*, unsigned*))dylib_proc(g_extern.filter.lib, "filter_size");
g_extern.filter.prender = g_extern.filter.prender =
@ -471,15 +478,11 @@ static void init_filter(bool rgb32)
} }
g_extern.filter.active = true; g_extern.filter.active = true;
struct retro_game_geometry *geom = &g_extern.system.av_info.geometry;
unsigned width = geom->max_width;
unsigned height = geom->max_height;
g_extern.filter.psize(&width, &height); g_extern.filter.psize(&width, &height);
unsigned pow2_x = next_pow2(width); pow2_x = next_pow2(width);
unsigned pow2_y = next_pow2(height); pow2_y = next_pow2(height);
unsigned maxsize = pow2_x > pow2_y ? pow2_x : pow2_y; maxsize = pow2_x > pow2_y ? pow2_x : pow2_y;
g_extern.filter.scale = maxsize / RARCH_SCALE_BASE; g_extern.filter.scale = maxsize / RARCH_SCALE_BASE;
g_extern.filter.buffer = (uint32_t*)malloc(RARCH_SCALE_BASE * RARCH_SCALE_BASE * g_extern.filter.buffer = (uint32_t*)malloc(RARCH_SCALE_BASE * RARCH_SCALE_BASE *

View File

@ -358,7 +358,7 @@ struct global
// CPU filters only work on *XRGB1555*. We have to convert to XRGB1555 first. // CPU filters only work on *XRGB1555*. We have to convert to XRGB1555 first.
struct scaler_ctx scaler; struct scaler_ctx scaler;
void *scaler_out; uint16_t *scaler_out;
} filter; } filter;
msg_queue_t *msg_queue; msg_queue_t *msg_queue;

View File

@ -237,6 +237,8 @@ static bool gfx_ctx_set_video_mode(
sigemptyset(&sa.sa_mask); sigemptyset(&sa.sa_mask);
sigaction(SIGINT, &sa, NULL); sigaction(SIGINT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL); sigaction(SIGTERM, &sa, NULL);
int x_off = 0;
int y_off = 0;
bool windowed_full = g_settings.video.windowed_fullscreen; bool windowed_full = g_settings.video.windowed_fullscreen;
bool true_full = false; bool true_full = false;
@ -264,8 +266,6 @@ static bool gfx_ctx_set_video_mode(
if (g_settings.video.monitor_index) if (g_settings.video.monitor_index)
g_screen = g_settings.video.monitor_index - 1; g_screen = g_settings.video.monitor_index - 1;
int x_off = 0;
int y_off = 0;
#ifdef HAVE_XINERAMA #ifdef HAVE_XINERAMA
if (fullscreen || g_screen != 0) if (fullscreen || g_screen != 0)
{ {

View File

@ -199,13 +199,13 @@ static XineramaScreenInfo *x11_query_screens(Display *dpy, int *num_screens)
{ {
int major, minor; int major, minor;
if (!XineramaQueryExtension(dpy, &major, &minor)) if (!XineramaQueryExtension(dpy, &major, &minor))
return false; return NULL;
XineramaQueryVersion(dpy, &major, &minor); XineramaQueryVersion(dpy, &major, &minor);
RARCH_LOG("[X11]: Xinerama version: %d.%d.\n", major, minor); RARCH_LOG("[X11]: Xinerama version: %d.%d.\n", major, minor);
if (!XineramaIsActive(dpy)) if (!XineramaIsActive(dpy))
return false; return NULL;
return XineramaQueryScreens(dpy, num_screens); return XineramaQueryScreens(dpy, num_screens);
} }

View File

@ -263,6 +263,8 @@ static bool gfx_ctx_set_video_mode(
XVisualInfo *vi = NULL; XVisualInfo *vi = NULL;
bool windowed_full = g_settings.video.windowed_fullscreen; bool windowed_full = g_settings.video.windowed_fullscreen;
bool true_full = false; bool true_full = false;
int x_off = 0;
int y_off = 0;
EGLint vid; EGLint vid;
if (!eglGetConfigAttrib(g_egl_dpy, g_config, EGL_NATIVE_VISUAL_ID, &vid)) if (!eglGetConfigAttrib(g_egl_dpy, g_config, EGL_NATIVE_VISUAL_ID, &vid))
@ -292,8 +294,6 @@ static bool gfx_ctx_set_video_mode(
if (g_settings.video.monitor_index) if (g_settings.video.monitor_index)
g_screen = g_settings.video.monitor_index - 1; g_screen = g_settings.video.monitor_index - 1;
int x_off = 0;
int y_off = 0;
#ifdef HAVE_XINERAMA #ifdef HAVE_XINERAMA
if (fullscreen || g_screen != 0) if (fullscreen || g_screen != 0)
{ {