mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
DisplayWindow: introduce _restart()
DisplayWindowMupen64plus: m_resize{Width,Height} moved from _resizeWindow() to _restart()
This commit is contained in:
parent
9a69fe8e58
commit
b200b33b84
|
@ -31,6 +31,7 @@ void DisplayWindow::stop()
|
||||||
|
|
||||||
void DisplayWindow::restart()
|
void DisplayWindow::restart()
|
||||||
{
|
{
|
||||||
|
_restart();
|
||||||
m_bResizeWindow = true;
|
m_bResizeWindow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,7 @@ private:
|
||||||
|
|
||||||
virtual bool _start() = 0;
|
virtual bool _start() = 0;
|
||||||
virtual void _stop() = 0;
|
virtual void _stop() = 0;
|
||||||
|
virtual void _restart() = 0;
|
||||||
virtual void _swapBuffers() = 0;
|
virtual void _swapBuffers() = 0;
|
||||||
virtual void _saveScreenshot() = 0;
|
virtual void _saveScreenshot() = 0;
|
||||||
virtual void _saveBufferContent(graphics::ObjectHandle _fbo, CachedTexture *_pTexture) = 0;
|
virtual void _saveBufferContent(graphics::ObjectHandle _fbo, CachedTexture *_pTexture) = 0;
|
||||||
|
|
|
@ -32,6 +32,7 @@ private:
|
||||||
|
|
||||||
bool _start() override;
|
bool _start() override;
|
||||||
void _stop() override;
|
void _stop() override;
|
||||||
|
void _restart() override;
|
||||||
void _swapBuffers() override;
|
void _swapBuffers() override;
|
||||||
void _saveScreenshot() override;
|
void _saveScreenshot() override;
|
||||||
void _saveBufferContent(graphics::ObjectHandle _fbo, CachedTexture *_pTexture) override;
|
void _saveBufferContent(graphics::ObjectHandle _fbo, CachedTexture *_pTexture) override;
|
||||||
|
@ -130,6 +131,19 @@ void DisplayWindowMupen64plus::_stop()
|
||||||
FunctionWrapper::CoreVideo_Quit();
|
FunctionWrapper::CoreVideo_Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DisplayWindowMupen64plus::_restart()
|
||||||
|
{
|
||||||
|
#ifdef M64P_GLIDENUI
|
||||||
|
if (_supportsWithRateFunctions && m_bFullscreen) {
|
||||||
|
m_resizeWidth = config.video.fullscreenWidth;
|
||||||
|
m_resizeHeight = config.video.fullscreenHeight;
|
||||||
|
} else {
|
||||||
|
m_resizeWidth = config.video.windowedWidth;
|
||||||
|
m_resizeHeight = config.video.windowedHeight;
|
||||||
|
}
|
||||||
|
#endif // M64P_GLIDENUI
|
||||||
|
}
|
||||||
|
|
||||||
void DisplayWindowMupen64plus::_swapBuffers()
|
void DisplayWindowMupen64plus::_swapBuffers()
|
||||||
{
|
{
|
||||||
// if emulator defined a render callback function, call it before buffer swap
|
// if emulator defined a render callback function, call it before buffer swap
|
||||||
|
@ -171,14 +185,6 @@ bool DisplayWindowMupen64plus::_resizeWindow()
|
||||||
if (!_supportsWithRateFunctions)
|
if (!_supportsWithRateFunctions)
|
||||||
m_bFullscreen = false;
|
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) {
|
if (_supportsWithRateFunctions) {
|
||||||
m64p_video_flags flags = {};
|
m64p_video_flags flags = {};
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ public:
|
||||||
private:
|
private:
|
||||||
bool _start() override;
|
bool _start() override;
|
||||||
void _stop() override;
|
void _stop() override;
|
||||||
|
void _restart() override;
|
||||||
void _swapBuffers() override;
|
void _swapBuffers() override;
|
||||||
void _saveScreenshot() override;
|
void _saveScreenshot() override;
|
||||||
void _saveBufferContent(graphics::ObjectHandle _fbo, CachedTexture *_pTexture) override;
|
void _saveBufferContent(graphics::ObjectHandle _fbo, CachedTexture *_pTexture) override;
|
||||||
|
@ -49,6 +50,11 @@ void DisplayWindowWindows::_stop()
|
||||||
FunctionWrapper::windowsStop();
|
FunctionWrapper::windowsStop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DisplayWindowWindows::_restart()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void DisplayWindowWindows::_swapBuffers()
|
void DisplayWindowWindows::_swapBuffers()
|
||||||
{
|
{
|
||||||
//Don't let the command queue grow too big buy waiting on no more swap buffers being queued
|
//Don't let the command queue grow too big buy waiting on no more swap buffers being queued
|
||||||
|
|
Loading…
Reference in New Issue
Block a user