Expose LCD filter for GBA and GB color saturation.
We offer a way to control the color saturation for GBA games such as Fire Emblem Tactics Advance. It will be enabled by default for GBA games and disabled for GB. The user will be able to toggle both of them and these options will be persistent by saving to `vbam.ini`. - Fix #131.
This commit is contained in:
parent
c789020e93
commit
99b66e1326
|
@ -133,6 +133,8 @@ bool mirroringEnable = true;
|
|||
bool parseDebug = true;
|
||||
bool speedHack = false;
|
||||
bool speedup = false;
|
||||
bool gbaLcdFilter = true;
|
||||
bool gbLcdFilter = false;
|
||||
const char* aviRecordDir;
|
||||
const char* batteryDir;
|
||||
const char* biosFileNameGB;
|
||||
|
|
|
@ -25,6 +25,8 @@ extern bool mirroringEnable;
|
|||
extern bool parseDebug;
|
||||
extern bool speedHack;
|
||||
extern bool speedup;
|
||||
extern bool gbaLcdFilter;
|
||||
extern bool gbLcdFilter;
|
||||
extern char *rewindMemory;
|
||||
extern const char *aviRecordDir;
|
||||
extern const char *biosFileNameGB;
|
||||
|
|
|
@ -2883,6 +2883,26 @@ EVT_HANDLER(AGBPrinter, "Enable AGB printer")
|
|||
update_opts();
|
||||
}
|
||||
|
||||
EVT_HANDLER(GBALcdFilter, "Enable LCD filter")
|
||||
{
|
||||
GetMenuOptionBool("GBALcdFilter", gbaLcdFilter);
|
||||
utilUpdateSystemColorMaps(gbaLcdFilter);
|
||||
update_opts();
|
||||
}
|
||||
|
||||
EVT_HANDLER(GBLcdFilter, "Enable LCD filter")
|
||||
{
|
||||
GetMenuOptionBool("GBLcdFilter", gbLcdFilter);
|
||||
utilUpdateSystemColorMaps(gbLcdFilter);
|
||||
update_opts();
|
||||
}
|
||||
|
||||
EVT_HANDLER(GBColorOption, "Enable GB color option")
|
||||
{
|
||||
GetMenuOptionInt("GBColorOption", gbColorOption, 1);
|
||||
update_opts();
|
||||
}
|
||||
|
||||
EVT_HANDLER(ApplyPatches, "Apply IPS/UPS/IPF patches if found")
|
||||
{
|
||||
GetMenuOptionInt("ApplyPatches", autoPatch, 1);
|
||||
|
|
|
@ -208,6 +208,8 @@ opt_desc opts[] = {
|
|||
|
||||
/// GB
|
||||
STROPT("GB/BiosFile", "", wxTRANSLATE("BIOS file to use for GB, if enabled"), gopts.gb_bios),
|
||||
INTOPT("GB/ColorOption", "GBColorOption", wxTRANSLATE("GB color enhancement, if enabled"), gbColorOption, 0, 1),
|
||||
BOOLOPT("GB/LCDFilter", "GBLcdFilter", wxTRANSLATE("Apply LCD filter, if enabled"), gbLcdFilter),
|
||||
STROPT("GB/GBCBiosFile", "", wxTRANSLATE("BIOS file to use for GBC, if enabled"), gopts.gbc_bios),
|
||||
NOOPT(wxT("GB/Palette0"), "", wxTRANSLATE("The default palette, as 8 comma-separated 4-digit hex integers (rgb555).")),
|
||||
NOOPT(wxT("GB/Palette1"), "", wxTRANSLATE("The first user palette, as 8 comma-separated 4-digit hex integers (rgb555).")),
|
||||
|
@ -219,6 +221,7 @@ opt_desc opts[] = {
|
|||
|
||||
/// GBA
|
||||
STROPT("GBA/BiosFile", "", wxTRANSLATE("BIOS file to use, if enabled"), gopts.gba_bios),
|
||||
BOOLOPT("GBA/LCDFilter", "GBALcdFilter", wxTRANSLATE("Apply LCD filter, if enabled"), gbaLcdFilter),
|
||||
#ifndef NO_LINK
|
||||
BOOLOPT("GBA/LinkAuto", "LinkAuto", wxTRANSLATE("Enable link at boot"), gopts.link_auto),
|
||||
INTOPT("GBA/LinkFast", "SpeedOn", wxTRANSLATE("Enable faster network protocol by default"), linkHacks, 0, 1),
|
||||
|
|
|
@ -1082,6 +1082,9 @@ void GameArea::OnIdle(wxIdleEvent& event)
|
|||
|
||||
mf->PollJoysticks();
|
||||
|
||||
if (loaded == IMAGE_GBA) utilUpdateSystemColorMaps(gbaLcdFilter);
|
||||
else if (loaded == IMAGE_GB) utilUpdateSystemColorMaps(gbLcdFilter);
|
||||
|
||||
if (!paused) {
|
||||
HidePointer();
|
||||
event.RequestMore();
|
||||
|
@ -1469,8 +1472,7 @@ DrawingPanelBase::DrawingPanelBase(int _width, int _height)
|
|||
RGB_LOW_BITS_MASK = 0x0421;
|
||||
}
|
||||
|
||||
// FIXME: should be "true" for GBA carts if lcd mode selected
|
||||
// which means this needs to be re-run at pref change time
|
||||
// needs to be run once before the first draw
|
||||
utilUpdateSystemColorMaps(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -508,6 +508,10 @@
|
|||
<label>_Debug print</label>
|
||||
<checkable>1</checkable>
|
||||
</object>
|
||||
<object class="wxMenuItem" name="GBALcdFilter">
|
||||
<label>_LCD Filter</label>
|
||||
<checkable>1</checkable>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxMenu">
|
||||
<label>_Game Boy</label>
|
||||
|
@ -515,6 +519,14 @@
|
|||
<label>Configure ...</label>
|
||||
</object>
|
||||
<object class="separator"/>
|
||||
<object class="wxMenuItem" name="GBColorOption">
|
||||
<label>_GB color option</label>
|
||||
<checkable>1</checkable>
|
||||
</object>
|
||||
<object class="wxMenuItem" name="GBLcdFilter">
|
||||
<label>_LCD Filter</label>
|
||||
<checkable>1</checkable>
|
||||
</object>
|
||||
<object class="wxMenuItem" name="Printer">
|
||||
<label>_GB printer</label>
|
||||
<checkable>1</checkable>
|
||||
|
|
Loading…
Reference in New Issue