Always use current window size.
It's used by irrlicht and in some other places in STK anyway. And if window size was changed for some reason, then ugly but functional window is better than non-functional at all.
This commit is contained in:
parent
6cb64a558e
commit
f974c9200c
@ -580,8 +580,6 @@ void IrrDriver::initDevice()
|
||||
m_scene_manager->addExternalMeshLoader(spml);
|
||||
spml->drop();
|
||||
|
||||
m_actual_screen_size = m_video_driver->getCurrentRenderTargetSize();
|
||||
|
||||
#ifdef ENABLE_RECORDER
|
||||
ogrRegGeneralCallback(OGR_CBT_START_RECORDING,
|
||||
[] (void* user_data) { MessageQueue::add
|
||||
@ -600,8 +598,8 @@ void IrrDriver::initDevice()
|
||||
RecorderConfig cfg;
|
||||
cfg.m_triple_buffering = 1;
|
||||
cfg.m_record_audio = 1;
|
||||
cfg.m_width = m_actual_screen_size.Width;
|
||||
cfg.m_height = m_actual_screen_size.Height;
|
||||
cfg.m_width = getActualScreenSize().Width;
|
||||
cfg.m_height = getActualScreenSize().Height;
|
||||
int vf = UserConfigParams::m_video_format;
|
||||
cfg.m_video_format = (VideoFormat)vf;
|
||||
cfg.m_audio_format = OGR_AF_VORBIS;
|
||||
|
@ -101,8 +101,6 @@ private:
|
||||
/** Wind. */
|
||||
Wind *m_wind;
|
||||
|
||||
core::dimension2du m_actual_screen_size;
|
||||
|
||||
/** The main MRT setup. */
|
||||
core::array<video::IRenderTarget> m_mrt;
|
||||
|
||||
@ -459,8 +457,9 @@ public:
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
const core::dimension2du getActualScreenSize() const
|
||||
{
|
||||
return m_actual_screen_size;
|
||||
{
|
||||
assert(m_video_driver != NULL);
|
||||
return m_video_driver->getCurrentRenderTargetSize();
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
float getSSAORadius() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user