Do not process frame when CPU filter is not activated.

This commit is contained in:
Themaister 2011-01-12 19:28:49 +01:00
parent c36608b6db
commit f9893b6c1b
3 changed files with 5 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include "bleed.h"
#include "ntsc.h"
#define FILTER_NONE 0
#define FILTER_HQ2X 1
#define FILTER_HQ4X 2
#define FILTER_GRAYSCALE 3

View File

@ -96,6 +96,7 @@ static void set_defaults(void)
g_settings.video.smooth = video_smooth;
g_settings.video.force_aspect = force_aspect;
g_settings.video.aspect_ratio = SNES_ASPECT_RATIO;
g_settings.video.filter = FILTER_NONE;
g_settings.audio.enable = audio_enable;
g_settings.audio.out_rate = out_rate;

View File

@ -103,7 +103,9 @@ static void video_frame(const uint16_t *data, unsigned width, unsigned height)
#ifdef HAVE_FILTER
uint16_t output_filter[width * height * 4 * 4];
uint16_t output[width * height];
process_frame(output, data, width, height);
if (g_settings.video.filter != FILTER_NONE)
process_frame(output, data, width, height);
switch (g_settings.video.filter)
{