mirror of
https://github.com/rhaleblian/dslibris.git
synced 2025-06-18 16:55:41 -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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main, dev ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ https://github.com/rhaleblian/dslibris
|
|||||||
class App {
|
class App {
|
||||||
private:
|
private:
|
||||||
void InitScreens();
|
void InitScreens();
|
||||||
void SetBrightness(int b);
|
void SetBrightness(u8 b);
|
||||||
void SetOrientation(bool flip);
|
void SetOrientation(bool flip);
|
||||||
void WifiInit();
|
void WifiInit();
|
||||||
bool WifiConnect();
|
bool WifiConnect();
|
||||||
|
@ -31,7 +31,7 @@ using namespace std;
|
|||||||
|
|
||||||
class App;
|
class App;
|
||||||
int asciiart();
|
int asciiart();
|
||||||
const char* ErrorString(uint);
|
const char* ErrorString(u8);
|
||||||
|
|
||||||
typedef struct TextFaceRec_ {
|
typedef struct TextFaceRec_ {
|
||||||
char file_path[128];
|
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/background.h"
|
||||||
#include "nds/arm9/input.h"
|
#include "nds/arm9/input.h"
|
||||||
|
|
||||||
#include "ndsx_brightness.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
@ -318,16 +317,15 @@ int App::Run(void)
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void App::SetBrightness(int b)
|
void App::SetBrightness(u8 b)
|
||||||
{
|
{
|
||||||
if(b<0) brightness = 0;
|
brightness = b % 4;
|
||||||
brightness = b%4;
|
setBrightness(3, brightness);
|
||||||
fifoSendValue32(BACKLIGHT_FIFO,brightness);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void App::CycleBrightness()
|
void App::CycleBrightness()
|
||||||
{
|
{
|
||||||
++brightness%=4;
|
++brightness %= 4;
|
||||||
SetBrightness(brightness);
|
SetBrightness(brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -888,7 +888,7 @@ int asciiart() {
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* ErrorString(uint c) {
|
const char* ErrorString(u8 c) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 0:
|
case 0:
|
||||||
return "ok";
|
return "ok";
|
||||||
|
Loading…
Reference in New Issue
Block a user