Changed backlightRange to maxBacklight
See updated README for more details.
This commit is contained in:
parent
edaea5f274
commit
2d26f51d56
11
README.md
11
README.md
|
@ -54,12 +54,11 @@ Video-related settings.
|
|||
### Advanced
|
||||
Options for advanced users. No pun intended. **If you don't know what you're doing, leave these options on the default settings.**
|
||||
|
||||
`u8 backlightRange` - Backlight range preset (default: `0`, max: `2`)
|
||||
* `0`: Recommended (`20`-`64`)
|
||||
* `1`: Old 3DS (`20`-`117`)
|
||||
* `2`: New 3DS (`16`-`142`)*
|
||||
|
||||
*Please do not use the New 3DS range on an Old 3DS.
|
||||
`bool maxBacklight` - Extend backlight limit (default: `false`)
|
||||
* `false`: `20`-`64`
|
||||
* `true`:
|
||||
* Old 3DS: `20`-`117`
|
||||
* New 3DS: `16`-`142`
|
||||
|
||||
## Compiling
|
||||
If you're using Windows 10, install and perform the following steps using [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/*
|
||||
* This file is part of Luma3DS
|
||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
||||
* Copyright (C) 2016-2020 Aurora Wright, TuxSH
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* This file is part of Luma3DS
|
||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
||||
* Copyright (C) 2016-2020 Aurora Wright, TuxSH
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
"contrast=1.0\n" \
|
||||
"brightness=0.0\n\n" \
|
||||
"[advanced]\n" \
|
||||
"backlightRange=0\n" \
|
||||
"maxBacklight=false\n" \
|
||||
|
||||
|
||||
typedef struct
|
||||
|
@ -69,7 +69,7 @@ typedef struct
|
|||
float brightness;
|
||||
|
||||
// [advanced]
|
||||
u8 backlightRange;
|
||||
bool maxBacklight;
|
||||
} OafConfig;
|
||||
|
||||
typedef struct
|
||||
|
@ -97,7 +97,7 @@ static OafConfig g_oafConfig =
|
|||
1.54f,
|
||||
1.f,
|
||||
0.f,
|
||||
0
|
||||
false
|
||||
};
|
||||
static KHandle g_frameReadyEvent = 0;
|
||||
|
||||
|
@ -534,8 +534,8 @@ static int confIniHandler(void* user, const char* section, const char* name, con
|
|||
}*/
|
||||
else if(strcmp(section, "advanced") == 0)
|
||||
{
|
||||
if(strcmp(name, "backlightRange") == 0)
|
||||
config->backlightRange = (u8)strtoul(value, NULL, 10);
|
||||
if(strcmp(name, "maxBacklight") == 0)
|
||||
config->maxBacklight = (strcmp(value, "true") == 0 ? true : false);
|
||||
}
|
||||
else return 0; // Error.
|
||||
|
||||
|
@ -606,23 +606,26 @@ static Result handleFsStuff(char romAndSavePath[512])
|
|||
// Parse config.
|
||||
parseConfig("config.ini", /* 0, */ &g_oafConfig);
|
||||
{ // TODO: Move this elsewhere?
|
||||
const u8 backlightRange = g_oafConfig.backlightRange;
|
||||
const bool maxBacklight = g_oafConfig.maxBacklight;
|
||||
u8 backlightMax;
|
||||
u8 backlightMin;
|
||||
switch(backlightRange)
|
||||
if(maxBacklight)
|
||||
{
|
||||
case 1:
|
||||
backlightMax = 117;
|
||||
backlightMin = 20;
|
||||
break;
|
||||
case 2:
|
||||
backlightMax = 142;
|
||||
backlightMin = 16;
|
||||
break;
|
||||
default:
|
||||
backlightMax = 64;
|
||||
backlightMin = 20;
|
||||
break;
|
||||
if(MCU_getSystemModel() >= 4)
|
||||
{
|
||||
backlightMax=142;
|
||||
backlightMin=16;
|
||||
}
|
||||
else
|
||||
{
|
||||
backlightMax=117;
|
||||
backlightMin=20;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
backlightMax=64;
|
||||
backlightMin=20;
|
||||
}
|
||||
|
||||
const u8 backlight = g_oafConfig.backlight;
|
||||
|
|
Loading…
Reference in New Issue