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
|
### Advanced
|
||||||
Options for advanced users. No pun intended. **If you don't know what you're doing, leave these options on the default settings.**
|
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`)
|
`bool maxBacklight` - Extend backlight limit (default: `false`)
|
||||||
* `0`: Recommended (`20`-`64`)
|
* `false`: `20`-`64`
|
||||||
* `1`: Old 3DS (`20`-`117`)
|
* `true`:
|
||||||
* `2`: New 3DS (`16`-`142`)*
|
* Old 3DS: `20`-`117`
|
||||||
|
* New 3DS: `16`-`142`
|
||||||
*Please do not use the New 3DS range on an Old 3DS.
|
|
||||||
|
|
||||||
## Compiling
|
## 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).
|
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
|
* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
"contrast=1.0\n" \
|
"contrast=1.0\n" \
|
||||||
"brightness=0.0\n\n" \
|
"brightness=0.0\n\n" \
|
||||||
"[advanced]\n" \
|
"[advanced]\n" \
|
||||||
"backlightRange=0\n" \
|
"maxBacklight=false\n" \
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -69,7 +69,7 @@ typedef struct
|
||||||
float brightness;
|
float brightness;
|
||||||
|
|
||||||
// [advanced]
|
// [advanced]
|
||||||
u8 backlightRange;
|
bool maxBacklight;
|
||||||
} OafConfig;
|
} OafConfig;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -97,7 +97,7 @@ static OafConfig g_oafConfig =
|
||||||
1.54f,
|
1.54f,
|
||||||
1.f,
|
1.f,
|
||||||
0.f,
|
0.f,
|
||||||
0
|
false
|
||||||
};
|
};
|
||||||
static KHandle g_frameReadyEvent = 0;
|
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)
|
else if(strcmp(section, "advanced") == 0)
|
||||||
{
|
{
|
||||||
if(strcmp(name, "backlightRange") == 0)
|
if(strcmp(name, "maxBacklight") == 0)
|
||||||
config->backlightRange = (u8)strtoul(value, NULL, 10);
|
config->maxBacklight = (strcmp(value, "true") == 0 ? true : false);
|
||||||
}
|
}
|
||||||
else return 0; // Error.
|
else return 0; // Error.
|
||||||
|
|
||||||
|
@ -606,23 +606,26 @@ static Result handleFsStuff(char romAndSavePath[512])
|
||||||
// Parse config.
|
// Parse config.
|
||||||
parseConfig("config.ini", /* 0, */ &g_oafConfig);
|
parseConfig("config.ini", /* 0, */ &g_oafConfig);
|
||||||
{ // TODO: Move this elsewhere?
|
{ // TODO: Move this elsewhere?
|
||||||
const u8 backlightRange = g_oafConfig.backlightRange;
|
const bool maxBacklight = g_oafConfig.maxBacklight;
|
||||||
u8 backlightMax;
|
u8 backlightMax;
|
||||||
u8 backlightMin;
|
u8 backlightMin;
|
||||||
switch(backlightRange)
|
if(maxBacklight)
|
||||||
{
|
{
|
||||||
case 1:
|
if(MCU_getSystemModel() >= 4)
|
||||||
backlightMax = 117;
|
{
|
||||||
backlightMin = 20;
|
backlightMax=142;
|
||||||
break;
|
backlightMin=16;
|
||||||
case 2:
|
}
|
||||||
backlightMax = 142;
|
else
|
||||||
backlightMin = 16;
|
{
|
||||||
break;
|
backlightMax=117;
|
||||||
default:
|
backlightMin=20;
|
||||||
backlightMax = 64;
|
}
|
||||||
backlightMin = 20;
|
}
|
||||||
break;
|
else
|
||||||
|
{
|
||||||
|
backlightMax=64;
|
||||||
|
backlightMin=20;
|
||||||
}
|
}
|
||||||
|
|
||||||
const u8 backlight = g_oafConfig.backlight;
|
const u8 backlight = g_oafConfig.backlight;
|
||||||
|
|
Loading…
Reference in New Issue