mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 04:22:50 +02:00
nvchannel: Fix SET_CLK_RATE
This commit is contained in:
parent
827c6b6ddf
commit
be45a91b9c
@ -261,8 +261,8 @@ Result nvioctlChannel_GetModuleClockRate(u32 fd, u32 module_id, u32 *freq) {
|
||||
.module = module_id,
|
||||
};
|
||||
|
||||
u32 ioctl = _NV_IOWR(0, hosversionAtLeast(8,0,0) ? 0x14 : 0x23, data);
|
||||
Result rc = nvIoctl(fd, ioctl, &data);
|
||||
u32 nr = _NV_IOWR(0, hosversionBefore(8,0,0) ? 0x14 : 0x23, data);
|
||||
Result rc = nvIoctl(fd, nr, &data);
|
||||
|
||||
if (R_SUCCEEDED(rc) && freq)
|
||||
*freq = data.rate;
|
||||
|
Loading…
Reference in New Issue
Block a user