From adede569d1e01868b95ab7444d1667a3cefd26e3 Mon Sep 17 00:00:00 2001 From: theoddone33 <> Date: Wed, 27 Feb 2002 06:24:13 +0000 Subject: [PATCH] Remove -fomit-frame-pointer to fix segfault on mode switch. Note: a real fix for this should be found soon. Also change hardcoded bitdepth for software mode, don't know why that was changed. --- zsnes/src/configure.in | 4 +++- zsnes/src/linux/sw_draw.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zsnes/src/configure.in b/zsnes/src/configure.in index 05ed6059..46ec14b6 100644 --- a/zsnes/src/configure.in +++ b/zsnes/src/configure.in @@ -134,8 +134,10 @@ else dnl Because of the way zsnes is written, these options make dnl zsnes more easily deal with small instruction caches, and more dnl effectivly use branch prediction. + dnl NOTE: -fomit-frame-pointer causes some segfaults + dnl DO NOT re-add it until they are fixed. - CFLAGS="$CFLAGS -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s" + CFLAGS="$CFLAGS -Os -ffast-math -fno-omit-frame-pointer -fschedule-insns2 -s" ZSNESEXE="zsnes" fi diff --git a/zsnes/src/linux/sw_draw.c b/zsnes/src/linux/sw_draw.c index 3f18e348..c24cf487 100644 --- a/zsnes/src/linux/sw_draw.c +++ b/zsnes/src/linux/sw_draw.c @@ -57,7 +57,7 @@ BOOL sw_start(int width, int height, int req_depth, int FullScreen) flags |= (FullScreen ? SDL_FULLSCREEN : 0); SurfaceX = width; SurfaceY = height; - surface = SDL_SetVideoMode(SurfaceX, SurfaceY, 16, flags); + surface = SDL_SetVideoMode(SurfaceX, SurfaceY, req_depth, flags); if (surface == NULL) { fprintf (stderr, "Could not set %dx%d video mode.\n", SurfaceX, SurfaceY); return FALSE;