4dsdev
Views: 1,610,137 Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 11-24-24 09:12 AM
Guest:

0 users reading Disable backlight | 1 bot

Main - Homebrew discussion - Disable backlight Hide post layouts | New reply


CTurt
Posted on 07-22-15 11:25 PM (rev. 2 of 07-22-15 11:26 PM) Link | #280
My app 3DS Controller doesn't use the top screen at all, and only the bottom screen occasionally for the on screen keyboard functionality.

So, to conserve battery power, I would like to disable backlight. Is this possible?

StapleButter
Posted on 07-22-15 11:50 PM Link | #281
Yes.


However, keep in mind that on the 2DS, the screens are physically one single screen and thus have a shared backlight, so turning one screen's backlight off would also turn the other one off.

____________________
blargSNES -- SNES emu for 3DS
More cool stuff

CTurt
Posted on 07-23-15 09:49 AM (rev. 2 of 07-23-15 12:06 PM) Link | #282
Worked it out.

#ifndef REG_LCDBACKLIGHTMAIN
#define REG_LCDBACKLIGHTMAIN (u32)(0x1ED02240 - 0x1EB00000)
#endif

#ifndef REG_LCDBACKLIGHTSUB
#define REG_LCDBACKLIGHTSUB (u32)(0x1ED02A40 - 0x1EB00000)
#endif

static u32 brightnessMain;
static u32 brightnessSub;

void disableBacklight() {
u32 off = 0;

GSPGPU_ReadHWRegs(NULL, REG_LCDBACKLIGHTMAIN, &brightnessMain, 4);
GSPGPU_ReadHWRegs(NULL, REG_LCDBACKLIGHTSUB, &brightnessSub, 4);

GSPGPU_WriteHWRegs(NULL, REG_LCDBACKLIGHTMAIN, &off, 4);
GSPGPU_WriteHWRegs(NULL, REG_LCDBACKLIGHTSUB, &off, 4);
}

void enableBacklight() {
GSPGPU_WriteHWRegs(NULL, REG_LCDBACKLIGHTMAIN, &brightnessMain, 4);
GSPGPU_WriteHWRegs(NULL, REG_LCDBACKLIGHTSUB, &brightnessSub, 4);
}


Main - Homebrew discussion - Disable backlight Hide post layouts | New reply

Page rendered in 0.010 seconds. (2048KB of memory used)
MySQL - queries: 26, rows: 67/67, time: 0.005 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.