hocclk: fix resolution read bug
thx masa for pointing this out
This commit is contained in:
@@ -29,7 +29,7 @@ namespace integrations {
|
|||||||
bool gSharedMemoryUsed = false;
|
bool gSharedMemoryUsed = false;
|
||||||
Handle gRemoteSharedMemory = 1;
|
Handle gRemoteSharedMemory = 1;
|
||||||
u64 gPrevTid = 0;
|
u64 gPrevTid = 0;
|
||||||
|
u8 resolutionLookup = 0;
|
||||||
bool CheckSaltyNXPort() {
|
bool CheckSaltyNXPort() {
|
||||||
Handle saltysd;
|
Handle saltysd;
|
||||||
|
|
||||||
@@ -129,6 +129,7 @@ namespace integrations {
|
|||||||
if (gPrevTid != tid) {
|
if (gPrevTid != tid) {
|
||||||
gNxFps = nullptr;
|
gNxFps = nullptr;
|
||||||
gPrevTid = tid;
|
gPrevTid = tid;
|
||||||
|
resolutionLookup = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gNxFps) {
|
if (!gNxFps) {
|
||||||
@@ -137,8 +138,15 @@ namespace integrations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gNxFps) {
|
if (gNxFps) {
|
||||||
gNxFps->renderCalls[0].calls = 0xFFFF;
|
if (!resolutionLookup) {
|
||||||
svcSleepThread(10*1000);
|
gNxFps->renderCalls[0].calls = 0xFFFF;
|
||||||
|
resolutionLookup = 1;
|
||||||
|
return 0;
|
||||||
|
} else if (resolutionLookup == 1) {
|
||||||
|
if (gNxFps->renderCalls[0].calls != 0xFFFF) resolutionLookup = 2;
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return gNxFps->renderCalls[0].height == 0 ? gNxFps->viewportCalls[0].height : gNxFps->renderCalls[0].height;
|
return gNxFps->renderCalls[0].height == 0 ? gNxFps->viewportCalls[0].height : gNxFps->renderCalls[0].height;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user