-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any chances on making a combo for turning off the screen? #5
Comments
If you have VITASDK installed you can try this patch: https://pastebin.com/raw/wK8fent0 |
Is It ready to compile ir do i need todo copypaste un one of the files? |
It's a patch file, but since it's a bit old I doubt it still applies so you have to apply the changes to each file manually. |
Oh i see, i'll try It tomorrow if i manage yo patchwork It properly, thanks so much! |
I managed to patch It manually and works like a charm! Thanks so much xerpi!! |
Nice, I'm glad it works. Maybe using |
I'll check if i can do It, because i'm actually suprised that It worked in the first try since i haven't any idea on programming but, there's allways a first time 😅 |
Oh haha then it's quite a feat if you managed to apply the patch and get it working without knowing how to program 😛 |
I'll unlock a trophy if i manage to implement those two "instructions?" Haha 😅 |
it almost worked, i mean with ksceOledDisplayOn/Off, but it turns off the oled then turns on inmediatly, don't know why.
} static void uvc_udcd_detach(void *user_data) |
forget about it, it was an stupid mistake of mine, it turned off then on because no capturing program was runing, i started potplayer then opened vita and voilá, screen is off permanently till usb disconects |
What version are you running on? I attempted this with my Vita 2000 on 3.65 added ksceLcdDisplayOff(); to uvc-udcd-attach and ksceLcdDisplayOn(); to uvc-udcd-detach. Display turned off fine and functioned as it should've but when I unplugged the cord the display stayed off, I tried multiple things and noticed that if I put ksceLcdDisplayOff(); under uvc-udcd-detach and remove it from uvc-udcd-attach the display still turns off, this leads me to believe that uvc_udcd_detach is called when the cable is plugged in therefore causing it to bug and just stay off? I'm new to this kinda stuff sorry if I'm using the wrong terminology. Edit: after a bit more tinkering, I'm fairly certain that ksceLcdDisplayOn doesn't work either on 3.65 or just entirely. Doesn't make sense though as ksceLcdDisplayOff works perfectly fine. Update: Found a fix(for anyone who's looking for it), SceUID uvc_frame_req_evflag;
int ksceLcdDisplayOff();
int ksceLcdDisplayOn();
int ksceLcdGetBrightness();
int ksceLcdSetBrightness(unsigned int brightness);
static unsigned int initial_brightness = 1; and static int uvc_udcd_attach(int usb_version, void *user_data)
{
LOG("uvc_udcd_attach %d\n", usb_version);
initial_brightness = ksceLcdGetBrightness();
ksceLcdDisplayOff();
ksceUdcdClearFIFO(&endpoints[2]);
return 0;
}
static void uvc_udcd_detach(void *user_data)
{
LOG("uvc_udcd_detach\n");
ksceLcdSetBrightness(initial_brightness);
/* ksceLcdDisplayOn(); Not Working*/
uvc_handle_video_abort();
} I guess setting the brightness wakes the screen up and the DisplayOff function works so it's all good :) |
Implemented 3 different versions: https://github.com/xerpi/vita-udcd-uvc/releases |
Basically os that, the plugin it's amazing un addition of DS3 vita but It Would be so nice to can turn off the screen while playing.
Thanks so much!
The text was updated successfully, but these errors were encountered: