Giter VIP home page Giter VIP logo

Comments (13)

xerpi avatar xerpi commented on July 18, 2024 1

Oh haha then it's quite a feat if you managed to apply the patch and get it working without knowing how to program ๐Ÿ˜›

from vita-udcd-uvc.

xerpi avatar xerpi commented on July 18, 2024 1

Implemented 3 different versions: https://github.com/xerpi/vita-udcd-uvc/releases

from vita-udcd-uvc.

xerpi avatar xerpi commented on July 18, 2024

If you have VITASDK installed you can try this patch: https://pastebin.com/raw/wK8fent0

from vita-udcd-uvc.

Varon9 avatar Varon9 commented on July 18, 2024

Is It ready to compile ir do i need todo copypaste un one of the files?

from vita-udcd-uvc.

xerpi avatar xerpi commented on July 18, 2024

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.

from vita-udcd-uvc.

Varon9 avatar Varon9 commented on July 18, 2024

Oh i see, i'll try It tomorrow if i manage yo patchwork It properly, thanks so much!

from vita-udcd-uvc.

Varon9 avatar Varon9 commented on July 18, 2024

I managed to patch It manually and works like a charm! Thanks so much xerpi!!

from vita-udcd-uvc.

xerpi avatar xerpi commented on July 18, 2024

Nice, I'm glad it works.

Maybe using ksceOledDisplayOn / ksceOledDisplayOff instead of the brightness functions would also work, and if it does, it will save more power.

from vita-udcd-uvc.

Varon9 avatar Varon9 commented on July 18, 2024

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 ๐Ÿ˜…

from vita-udcd-uvc.

Varon9 avatar Varon9 commented on July 18, 2024

I'll unlock a trophy if i manage to implement those two "instructions?" Haha ๐Ÿ˜…

from vita-udcd-uvc.

Varon9 avatar Varon9 commented on July 18, 2024

it almost worked, i mean with ksceOledDisplayOn/Off, but it turns off the oled then turns on inmediatly, don't know why.
static int uvc_udcd_attach(int usb_version, void *user_data)
{
LOG("uvc_udcd_attach %d\n", usb_version);

ksceOledDisplayOff();

ksceUdcdClearFIFO(&endpoints[2]);

return 0;

}

static void uvc_udcd_detach(void *user_data)
{
LOG("uvc_udcd_detach\n");
ksceOledDisplayOn();
uvc_handle_video_abort();
}
this is what i did

from vita-udcd-uvc.

Varon9 avatar Varon9 commented on July 18, 2024

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

from vita-udcd-uvc.

Emiougus avatar Emiougus commented on July 18, 2024

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 :)

from vita-udcd-uvc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.