GnomeScreensaver: aspect ratio is for entire virtual screen, not just one monitor
This commit is contained in:
parent
27e302f126
commit
6cd00909e0
@ -150,7 +150,7 @@ gboolean GnomeScreensaver::configureCB(GtkWidget *da, GdkEventConfigure *event)
|
|||||||
m_n_monitors++)
|
m_n_monitors++)
|
||||||
;
|
;
|
||||||
|
|
||||||
m_aspect_ratio = (float)m_width / (float)m_n_monitors / (float)m_height;
|
m_aspect_ratio = (float)m_width / (float)m_height;
|
||||||
|
|
||||||
gboolean rc = m_configure_callback(*this);
|
gboolean rc = m_configure_callback(*this);
|
||||||
|
|
||||||
|
@ -29,7 +29,8 @@ bool Spin::configure (GnomeScreensaver & gs)
|
|||||||
{
|
{
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
gluPerspective(60.0, gs.getAspectRatio(), 0.01, 1000.0);
|
gluPerspective(60.0, gs.getAspectRatio() / gs.getNumMonitors(),
|
||||||
|
0.01, 1000.0);
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user