mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Fix _resizeWindow for M64P_GLIDENUI
This commit is contained in:
parent
859af888c4
commit
3179b37e8a
|
@ -161,7 +161,48 @@ bool DisplayWindowMupen64plus::_resizeWindow()
|
||||||
{
|
{
|
||||||
_setAttributes();
|
_setAttributes();
|
||||||
|
|
||||||
|
#ifndef M64P_GLIDENUI
|
||||||
m_bFullscreen = false;
|
m_bFullscreen = false;
|
||||||
|
#endif // M64P_GLIDENUI
|
||||||
|
|
||||||
|
#ifdef M64P_GLIDENUI
|
||||||
|
m64p_error returnValue;
|
||||||
|
|
||||||
|
if (!_supportsWithRateFunctions)
|
||||||
|
m_bFullscreen = false;
|
||||||
|
|
||||||
|
if (m_bFullscreen)
|
||||||
|
{
|
||||||
|
m_resizeWidth = config.video.fullscreenWidth;
|
||||||
|
m_resizeHeight = config.video.fullscreenHeight;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_resizeWidth = config.video.windowedWidth;
|
||||||
|
m_resizeHeight = config.video.windowedHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_supportsWithRateFunctions)
|
||||||
|
{
|
||||||
|
m64p_video_flags flags = {};
|
||||||
|
|
||||||
|
m_width = m_screenWidth = m_resizeWidth;
|
||||||
|
m_height = m_screenHeight = m_resizeHeight;
|
||||||
|
|
||||||
|
returnValue = FunctionWrapper::CoreVideo_SetVideoModeWithRate(m_screenWidth, m_screenHeight, m_screenRefresh, 0, m_bFullscreen ? M64VIDEO_FULLSCREEN : M64VIDEO_WINDOWED, flags);
|
||||||
|
if (returnValue != M64ERR_SUCCESS)
|
||||||
|
{
|
||||||
|
LOG(LOG_ERROR, "Error setting videomode %dx%d @ %d. Error code: %d", m_screenWidth, m_screenHeight, m_screenRefresh, returnValue);
|
||||||
|
FunctionWrapper::CoreVideo_Quit();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
_setBufferSize();
|
||||||
|
opengl::Utils::isGLError(); // reset GL error.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif // M64P_GLIDENUI
|
||||||
|
|
||||||
m_width = m_screenWidth = m_resizeWidth;
|
m_width = m_screenWidth = m_resizeWidth;
|
||||||
m_height = m_screenHeight = m_resizeHeight;
|
m_height = m_screenHeight = m_resizeHeight;
|
||||||
switch (CoreVideo_ResizeWindow(m_screenWidth, m_screenHeight))
|
switch (CoreVideo_ResizeWindow(m_screenWidth, m_screenHeight))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user