Update brightness call

This commit is contained in:
Ray Haleblian 2025-04-06 14:08:48 -04:00
parent 13b3c92d9f
commit 035be4a08f
5 changed files with 8 additions and 10 deletions

View File

@ -2,7 +2,7 @@ name: devkitARM build
on:
push:
branches: [ main ]
branches: [ main, dev ]
pull_request:
branches: [ main ]

View File

@ -85,7 +85,7 @@ https://github.com/rhaleblian/dslibris
class App {
private:
void InitScreens();
void SetBrightness(int b);
void SetBrightness(u8 b);
void SetOrientation(bool flip);
void WifiInit();
bool WifiConnect();

View File

@ -31,7 +31,7 @@ using namespace std;
class App;
int asciiart();
const char* ErrorString(uint);
const char* ErrorString(u8);
typedef struct TextFaceRec_ {
char file_path[128];

View File

@ -36,7 +36,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "nds/arm9/background.h"
#include "nds/arm9/input.h"
#include "ndsx_brightness.h"
#include "types.h"
#include "main.h"
#include "parse.h"
@ -318,16 +317,15 @@ int App::Run(void)
exit(0);
}
void App::SetBrightness(int b)
void App::SetBrightness(u8 b)
{
if(b<0) brightness = 0;
brightness = b%4;
fifoSendValue32(BACKLIGHT_FIFO,brightness);
brightness = b % 4;
setBrightness(3, brightness);
}
void App::CycleBrightness()
{
++brightness%=4;
++brightness %= 4;
SetBrightness(brightness);
}

View File

@ -888,7 +888,7 @@ int asciiart() {
return error;
}
const char* ErrorString(uint c) {
const char* ErrorString(u8 c) {
switch (c) {
case 0:
return "ok";