| View previous topic :: View next topic |
| Author |
Message |
XazZ
Joined: 25 Aug 2006 Posts: 10
|
Posted: Mon Jan 29, 2007 2:43 am Post subject: 4th brightness level... |
|
|
Hi...
I've been looking around some forums and google but I couldn't find an answer
OK, here comes my problem:
I wanna set the 4th screen brightness level without having the AC-adapter plugged in...
Can I do this with my own little app too? (I mean is there a function that does this for me)
Thanks in advance
XazZ |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Mon Jan 29, 2007 3:09 pm Post subject: |
|
|
Register with the irShell forum and ask Ahman, because the latest
version of irShell can do it. I would suspect it requires kernal mode.
Sorry I can't help with how it is actually done. |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Mon Jan 29, 2007 9:46 pm Post subject: |
|
|
| sceDisplaySetBrightness? :) |
|
| Back to top |
|
 |
XazZ
Joined: 25 Aug 2006 Posts: 10
|
Posted: Tue Jan 30, 2007 3:30 am Post subject: |
|
|
| Art wrote: | Register with the irShell forum and ask Ahman, because the latest
version of irShell can do it. I would suspect it requires kernal mode.
Sorry I can't help with how it is actually done. |
No problem...
Kernel mode is not the problem ;)
And thanks for the hint with irShell - I'll register with Ahman's forum and ask there
| adrahil wrote: | | sceDisplaySetBrightness? :) |
first thing: good idea :)
second thing: I couldn't find any documentation about it....
I've played with it a bit and I found out that this code: | Code: | | sceDisplaySetBrightness(0,0); | seems to work....
But I'm not sure witch header files have to be included
I've tried these basic ones: | Code: | #include <pspkernel.h>
#include <stdio.h>
#include <pspctrl.h> |
Oh, and I haven't changed the makefile, so it still uses the "standard" libs...
EDIT: Think before you klick on Submit!
The most important output - my compilers error message:
| Code: | main.o: In function `main':
main.c:(.text+0x20): undefined reference to `sceDisplay_driver_9E3C6DC6'
main.c:(.text+0x3c): undefined reference to `sceDisplay_driver_9E3C6DC6'
main.c:(.text+0x54): undefined reference to `sceDisplay_driver_9E3C6DC6'
|
thanks
XazZ |
|
| Back to top |
|
 |
pspwill
Joined: 17 Nov 2005 Posts: 51
|
Posted: Tue Jan 30, 2007 7:30 am Post subject: |
|
|
| You have to stub the function in sceDisplay.S and recompile the display lib. |
|
| Back to top |
|
 |
weltall
Joined: 20 Feb 2004 Posts: 310
|
Posted: Tue Jan 30, 2007 7:31 am Post subject: |
|
|
it's a kernel only function as it's part of the diplay_driver library
void sceDisplay_driver_9E3C6DC6(int a0,int a1);//a0 0-100,a1 = 0/1 (set to 0)
#define sceDisplaySetBrightness sceDisplay_driver_9E3C6DC6
void sceDisplay_driver_31C4BAA8(int *a0,int *a1);
#define sceDisplayGetBrightness sceDisplay_driver_31C4BAA8 |
|
| Back to top |
|
 |
XazZ
Joined: 25 Aug 2006 Posts: 10
|
Posted: Tue Jan 30, 2007 11:38 pm Post subject: |
|
|
thanks weltall...
I already had this code | Code: | #define sceDisplaySetBrightness sceDisplay_driver_9E3C6DC6
void sceDisplay_driver_9E3C6DC6(int a0,int a1); /*a0 0-100,a1 = 0/1 (set to 0)*/ |
so I added -lpspdisplay_driver to the libs in the makefile - and it (almost) works...
@pspwill: I didn't had to reconfigure the display-lib... - and that is good, because I'm still a beginner
I just need to figure out the values for sceDisplaySetBrightness - I can't find any documentation about it...
and my sceDisplaySetBrightness(0,0); isn't working...
thanks
XazZ |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Wed Jan 31, 2007 6:59 am Post subject: |
|
|
You have args right here.....
0 to 100 is the 1st arg, brightness.....
2nd has to be 0 :)
| Code: | #define sceDisplaySetBrightness sceDisplay_driver_9E3C6DC6
void sceDisplay_driver_9E3C6DC6(int a0,int a1); /*a0 0-100,a1 = 0/1 (set to 0)*/ |
|
|
| Back to top |
|
 |
|