fix: fix return for SetRefreshRate method always returning 0

The method will correctly return 0 when request has been accepted and -1 if the system cannot change the refresh rate. This was the previous behaviour when using the VrAPI.
This commit is contained in:
Emanuele Disco 2023-01-04 16:11:14 +09:00
parent 600f048355
commit e39bb37ffb

View file

@ -84,12 +84,12 @@ void QzDoom_setUseScreenLayer(bool use)
int QzDoom_SetRefreshRate(int refreshRate)
{
XrResult result;
#ifdef META_QUEST
OXR(gAppState.pfnRequestDisplayRefreshRate(gAppState.Session, (float)refreshRate));
return refreshRate;
OXR(result = gAppState.pfnRequestDisplayRefreshRate(gAppState.Session, (float)refreshRate));
#endif
return 0;
return XR_SUCCEEDED(result) ? 0 : -1;
}
void QzDoom_GetScreenRes(uint32_t *width, uint32_t *height)