libnds: setBrightness
Posted: Sun Mar 29, 2009 9:32 pm
In video.c :
This line should set the brightness
for the sub engine, but instead sets the main engine again:
if (screen & 2) REG_MASTER_BRIGHT=(mode | level);
EDIT:
The correct register should be REG_MASTER_BRIGHT_SUB
Keep on your good work
RyouArashi
The function only sets Brightness for the main engine.//---------------------------------------------------------------------------------
void setBrightness( int screen, int level) {
//---------------------------------------------------------------------------------
int mode = 1<<14;
if ( level < 0){
level = -level;
mode = 2<<14;
}
if (level>16) level =16;
if (screen & 1) REG_MASTER_BRIGHT=(mode | level);
if (screen & 2) REG_MASTER_BRIGHT=(mode | level);
}
This line should set the brightness
for the sub engine, but instead sets the main engine again:
if (screen & 2) REG_MASTER_BRIGHT=(mode | level);
EDIT:
The correct register should be REG_MASTER_BRIGHT_SUB
Keep on your good work
RyouArashi