- Revert commandline.cpp and videofilter.cpp back to r4536. Fixes regression from r4538 that broke compiling on non-Windows platforms.
- Do temporary workaround for setting the scanline filter parameters on Windows.
This commit is contained in:
parent
f00e94c64b
commit
514e09a159
|
@ -28,7 +28,7 @@
|
|||
#include "NDSSystem.h"
|
||||
#include "utils/xstring.h"
|
||||
|
||||
int scanline_filter_a = 0, scanline_filter_b = 2, scanline_filter_c = 2, scanline_filter_d = 4;
|
||||
int _scanline_filter_a = 0, _scanline_filter_b = 2, _scanline_filter_c = 2, _scanline_filter_d = 4;
|
||||
int _commandline_linux_nojoy = 0;
|
||||
|
||||
CommandLine::CommandLine()
|
||||
|
@ -91,10 +91,10 @@ void CommandLine::loadCommonOptions()
|
|||
{ "bios-swi", 0, 0, G_OPTION_ARG_INT, &_bios_swi, "Uses SWI from the provided bios files", "BIOS_SWI"},
|
||||
{ "spu-advanced", 0, 0, G_OPTION_ARG_INT, &_spu_advanced, "Uses advanced SPU capture functions", "SPU_ADVANCED"},
|
||||
{ "num-cores", 0, 0, G_OPTION_ARG_INT, &_num_cores, "Override numcores detection and use this many", "NUM_CORES"},
|
||||
{ "scanline-filter-a", 0, 0, G_OPTION_ARG_INT, &scanline_filter_a, "Intensity of fadeout for scanlines filter (topleft) (default 0)", "SCANLINE_FILTER_A"},
|
||||
{ "scanline-filter-b", 0, 0, G_OPTION_ARG_INT, &scanline_filter_b, "Intensity of fadeout for scanlines filter (topright) (default 2)", "SCANLINE_FILTER_B"},
|
||||
{ "scanline-filter-c", 0, 0, G_OPTION_ARG_INT, &scanline_filter_c, "Intensity of fadeout for scanlines filter (bottomleft) (default 2)", "SCANLINE_FILTER_C"},
|
||||
{ "scanline-filter-d", 0, 0, G_OPTION_ARG_INT, &scanline_filter_d, "Intensity of fadeout for scanlines filter (bottomright) (default 4)", "SCANLINE_FILTER_D"},
|
||||
{ "scanline-filter-a", 0, 0, G_OPTION_ARG_INT, &_scanline_filter_a, "Intensity of fadeout for scanlines filter (topleft) (default 0)", "SCANLINE_FILTER_A"},
|
||||
{ "scanline-filter-b", 0, 0, G_OPTION_ARG_INT, &_scanline_filter_b, "Intensity of fadeout for scanlines filter (topright) (default 2)", "SCANLINE_FILTER_B"},
|
||||
{ "scanline-filter-c", 0, 0, G_OPTION_ARG_INT, &_scanline_filter_c, "Intensity of fadeout for scanlines filter (bottomleft) (default 2)", "SCANLINE_FILTER_C"},
|
||||
{ "scanline-filter-d", 0, 0, G_OPTION_ARG_INT, &_scanline_filter_d, "Intensity of fadeout for scanlines filter (bottomright) (default 4)", "SCANLINE_FILTER_D"},
|
||||
{ "rigorous-timing", 0, 0, G_OPTION_ARG_INT, &_rigorous_timing, "Use some rigorous timings instead of unrealistically generous (default 0)", "RIGOROUS_TIMING"},
|
||||
{ "advanced-timing", 0, 0, G_OPTION_ARG_INT, &_advanced_timing, "Use advanced BUS-level timing (default 1)", "ADVANCED_TIMING"},
|
||||
{ "slot1", 0, 0, G_OPTION_ARG_STRING, &_slot1, "Device to load in slot 1 (default retail)", "SLOT1"},
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
#include <string.h>
|
||||
|
||||
// Parameters for Scanline filter
|
||||
int _scanline_filter_a = 0;
|
||||
int _scanline_filter_b = 2;
|
||||
int _scanline_filter_c = 2;
|
||||
int _scanline_filter_d = 4;
|
||||
int scanline_filter_a = 0;
|
||||
int scanline_filter_b = 2;
|
||||
int scanline_filter_c = 2;
|
||||
int scanline_filter_d = 4;
|
||||
|
||||
//
|
||||
typedef struct
|
||||
|
@ -33,10 +33,10 @@ typedef struct
|
|||
} _VideoFilterParamAttributes;
|
||||
|
||||
static const _VideoFilterParamAttributes _VideoFilterParamAttributesList[] = {
|
||||
{&_scanline_filter_a, VF_INT},
|
||||
{&_scanline_filter_b, VF_INT},
|
||||
{&_scanline_filter_c, VF_INT},
|
||||
{&_scanline_filter_d, VF_INT},
|
||||
{&scanline_filter_a, VF_INT},
|
||||
{&scanline_filter_b, VF_INT},
|
||||
{&scanline_filter_c, VF_INT},
|
||||
{&scanline_filter_d, VF_INT},
|
||||
};
|
||||
|
||||
/********************************************************************************************
|
||||
|
|
|
@ -434,6 +434,19 @@ volatile bool paused = true;
|
|||
volatile BOOL pausedByMinimize = FALSE;
|
||||
u32 glock = 0;
|
||||
|
||||
// Scanline filter parameters. The first set is from commandline.cpp, the second
|
||||
// set is externed to scanline.cpp.
|
||||
// TODO: When videofilter.cpp becomes Windows-friendly, remove the second set of
|
||||
// variables, as they will no longer be necessary at that point.
|
||||
extern int _scanline_filter_a;
|
||||
extern int _scanline_filter_b;
|
||||
extern int _scanline_filter_c;
|
||||
extern int _scanline_filter_d;
|
||||
int scanline_filter_a = 0;
|
||||
int scanline_filter_b = 2;
|
||||
int scanline_filter_c = 2;
|
||||
int scanline_filter_d = 4;
|
||||
|
||||
BOOL finished = FALSE;
|
||||
bool romloaded = false;
|
||||
|
||||
|
@ -2928,6 +2941,18 @@ int _main()
|
|||
}
|
||||
cmdline.validate();
|
||||
start_paused = cmdline.start_paused!=0;
|
||||
|
||||
// Temporary scanline parameter setting for Windows.
|
||||
// TODO: When videofilter.cpp becomes Windows-friendly, replace the direct setting of
|
||||
// variables with SetFilterParameteri().
|
||||
//myVideoFilterObject->SetFilterParameteri(VF_PARAM_SCANLINE_A, _scanline_filter_a);
|
||||
//myVideoFilterObject->SetFilterParameteri(VF_PARAM_SCANLINE_B, _scanline_filter_b);
|
||||
//myVideoFilterObject->SetFilterParameteri(VF_PARAM_SCANLINE_C, _scanline_filter_c);
|
||||
//myVideoFilterObject->SetFilterParameteri(VF_PARAM_SCANLINE_D, _scanline_filter_d);
|
||||
scanline_filter_a = _scanline_filter_a;
|
||||
scanline_filter_b = _scanline_filter_b;
|
||||
scanline_filter_c = _scanline_filter_c;
|
||||
scanline_filter_d = _scanline_filter_d;
|
||||
|
||||
Desmume_InitOnce();
|
||||
aggDraw.hud->setFont(fonts_list[GetPrivateProfileInt("Display","HUD Font", font_Nums-1, IniName)].name);
|
||||
|
|
Loading…
Reference in New Issue