Re-send aspect ratio settings to viewer when changing video driver.
This commit is contained in:
parent
4eb7543838
commit
d3f25269c8
|
@ -293,6 +293,19 @@ void ConsoleViewSDL_t::reset(void)
|
|||
}
|
||||
}
|
||||
|
||||
void ConsoleViewSDL_t::showEvent(QShowEvent *event)
|
||||
{
|
||||
//printf("SDL Show: %i x %i \n", width(), height() );
|
||||
|
||||
//view_width = width();
|
||||
//view_height = height();
|
||||
|
||||
//gui_draw_area_width = view_width;
|
||||
//gui_draw_area_height = view_height;
|
||||
|
||||
//reset();
|
||||
}
|
||||
|
||||
void ConsoleViewSDL_t::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QSize s;
|
||||
|
|
|
@ -41,6 +41,7 @@ class ConsoleViewSDL_t : public QWidget
|
|||
protected:
|
||||
|
||||
//void paintEvent(QPaintEvent *event);
|
||||
void showEvent(QShowEvent *event);
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void mousePressEvent(QMouseEvent * event);
|
||||
void mouseReleaseEvent(QMouseEvent * event);
|
||||
|
|
|
@ -1671,7 +1671,10 @@ int consoleWin_t::loadVideoDriver( int driverId )
|
|||
|
||||
setCentralWidget(viewport_SDL);
|
||||
|
||||
setViewportAspect();
|
||||
|
||||
viewport_SDL->init();
|
||||
|
||||
}
|
||||
else
|
||||
{ // OpenGL Driver
|
||||
|
@ -1693,7 +1696,12 @@ int consoleWin_t::loadVideoDriver( int driverId )
|
|||
viewport_GL = new ConsoleViewGL_t(this);
|
||||
|
||||
setCentralWidget(viewport_GL);
|
||||
|
||||
setViewportAspect();
|
||||
|
||||
viewport_GL->init();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue