mirror of
https://github.com/rhaleblian/dslibris.git
synced 2025-06-18 08:45:40 -04:00
Update brightness call
This commit is contained in:
parent
13b3c92d9f
commit
035be4a08f
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -2,7 +2,7 @@ name: devkitARM build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [ main, dev ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -888,7 +888,7 @@ int asciiart() {
|
||||
return error;
|
||||
}
|
||||
|
||||
const char* ErrorString(uint c) {
|
||||
const char* ErrorString(u8 c) {
|
||||
switch (c) {
|
||||
case 0:
|
||||
return "ok";
|
||||
|
Loading…
Reference in New Issue
Block a user