show black before resolution switch so we don't see OpenGL's buffer garbage during switch; made the 'previous' width and height in user preferences valid again
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3418 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
db978329ad
commit
94bbe12636
@ -99,6 +99,14 @@ void IrrDriver::initDevice()
|
||||
|
||||
void IrrDriver::changeResolution()
|
||||
{
|
||||
// show black before resolution switch so we don't see OpenGL's buffer garbage during switch
|
||||
m_device->getVideoDriver()->beginScene(true, true, video::SColor(255,100,101,140));
|
||||
m_device->getVideoDriver()->draw2DRectangle( SColor(255, 0, 0, 0),
|
||||
core::rect<s32>(0, 0,
|
||||
user_config->m_prev_width,
|
||||
user_config->m_prev_height) );
|
||||
m_device->getVideoDriver()->endScene();
|
||||
|
||||
// startScreen -> removeTextures();
|
||||
attachment_manager -> removeTextures();
|
||||
projectile_manager -> removeTextures();
|
||||
|
@ -387,6 +387,9 @@ namespace StateManager
|
||||
}
|
||||
else if(name == "apply_resolution")
|
||||
{
|
||||
user_config->m_prev_width = user_config->m_width;
|
||||
user_config->m_prev_height = user_config->m_height;
|
||||
|
||||
user_config->m_width = 800;
|
||||
user_config->m_height = 480;
|
||||
irr_driver->changeResolution();
|
||||
|
Loading…
Reference in New Issue
Block a user