mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
[Code cleanup] Fix code formatting in mupen64plus_DisplayWindow.cpp in accordance with the rest of the code.
This commit is contained in:
parent
3179b37e8a
commit
3dfa0e7622
|
@ -171,27 +171,22 @@ bool DisplayWindowMupen64plus::_resizeWindow()
|
|||
if (!_supportsWithRateFunctions)
|
||||
m_bFullscreen = false;
|
||||
|
||||
if (m_bFullscreen)
|
||||
{
|
||||
if (m_bFullscreen) {
|
||||
m_resizeWidth = config.video.fullscreenWidth;
|
||||
m_resizeHeight = config.video.fullscreenHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
m_resizeWidth = config.video.windowedWidth;
|
||||
m_resizeHeight = config.video.windowedHeight;
|
||||
}
|
||||
|
||||
if (_supportsWithRateFunctions)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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;
|
||||
|
@ -205,8 +200,7 @@ bool DisplayWindowMupen64plus::_resizeWindow()
|
|||
|
||||
m_width = m_screenWidth = m_resizeWidth;
|
||||
m_height = m_screenHeight = m_resizeHeight;
|
||||
switch (CoreVideo_ResizeWindow(m_screenWidth, m_screenHeight))
|
||||
{
|
||||
switch (CoreVideo_ResizeWindow(m_screenWidth, m_screenHeight)) {
|
||||
case M64ERR_INVALID_STATE:
|
||||
LOG(LOG_ERROR, "Error setting videomode %dx%d in fullscreen mode", m_screenWidth, m_screenHeight);
|
||||
m_width = m_screenWidth = config.video.windowedWidth;
|
||||
|
@ -229,18 +223,14 @@ bool DisplayWindowMupen64plus::_resizeWindow()
|
|||
void DisplayWindowMupen64plus::_changeWindow()
|
||||
{
|
||||
#ifdef M64P_GLIDENUI
|
||||
if (_supportsWithRateFunctions)
|
||||
{
|
||||
if (_supportsWithRateFunctions) {
|
||||
m64p_error returnValue;
|
||||
m_bFullscreen = !m_bFullscreen;
|
||||
if (m_bFullscreen)
|
||||
{
|
||||
if (m_bFullscreen) {
|
||||
m_screenWidth = config.video.fullscreenWidth;
|
||||
m_screenHeight = config.video.fullscreenHeight;
|
||||
m_screenRefresh = config.video.fullscreenRefresh;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
m_screenWidth = config.video.windowedWidth;
|
||||
m_screenHeight = config.video.windowedHeight;
|
||||
}
|
||||
|
@ -248,14 +238,11 @@ void DisplayWindowMupen64plus::_changeWindow()
|
|||
m64p_video_flags flags = {};
|
||||
returnValue = FunctionWrapper::CoreVideo_SetVideoModeWithRate(m_screenWidth, m_screenHeight, m_screenRefresh, 0, m_bFullscreen ? M64VIDEO_FULLSCREEN : M64VIDEO_WINDOWED, flags);
|
||||
|
||||
if (returnValue != M64ERR_SUCCESS)
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
#endif // M64P_GLIDENUI
|
||||
CoreVideo_ToggleFullScreen();
|
||||
#ifdef M64P_GLIDENUI
|
||||
|
|
Loading…
Reference in New Issue
Block a user