Page 1 of 1

libnds: setBrightness

Posted: Sun Mar 29, 2009 9:32 pm
by RyouArashi
In video.c :
//---------------------------------------------------------------------------------
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);
}
The function only sets Brightness for the main engine.

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

Re: libnds: setBrightness

Posted: Wed Apr 15, 2009 2:32 pm
by eKid
Thanks for pointing that out, it'll be fixed for next release.

Re: libnds: setBrightness

Posted: Mon May 18, 2009 3:30 pm
by Aeluin
Hello!

Excuse me for resurrect the Post ( necromancer!!) and for the English (I'm spanish).

Where could be the video.c file in hard disk? I'm trying to search it for modify these lines but I don't found it. I have installed devkitpro in C:\

Thanks you for reading

Re: libnds: setBrightness

Posted: Thu May 21, 2009 9:56 pm
by Al_Bro
If you've just installed the devkitpro updater (the obvious download link) then you probably won't have it. You need to download the libnds source code, modify the files and then build it. Not sure if this link will work, but try http://sourceforge.net/project/showfile ... _id=151608. You want to look for the source code file (currently libnds-src-1.3.3.tar.bz2) and you'll need a program like 7-Zip to be able to extract it on windows.

After you've built the library you'll need to make sure that you copy the built library files (look for files like libnds9.a and libnds9d.a in the lib directory) into the main libnds library directory (c:\devkitpro\libnds\lib on my installation).

Re: libnds: setBrightness

Posted: Fri May 22, 2009 4:00 pm
by WinterMute
Installation is handled automatically by using "make install", manual copying is frowned upon :p

Re: libnds: setBrightness

Posted: Sat May 23, 2009 9:02 pm
by Al_Bro
Excellent - I didn't realise it had been set up to do that. In that case yes, that's a much better way than manually copying.