mirror of https://github.com/fltk/fltk
Avoid repetitive calls to Fl_Screen_Driver::screen_count()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12942 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
793a66ace5
commit
34990a9d30
|
@ -451,10 +451,10 @@ void Fl_Screen_Driver::open_display()
|
|||
static bool been_here = false;
|
||||
if (!been_here) {
|
||||
been_here = true;
|
||||
screen_count(); // initialize, but ignore return value
|
||||
int scount = screen_count(); // keep here
|
||||
if (rescalable()) {
|
||||
float factor = use_startup_scale_factor();
|
||||
if (factor) for (int i = 0; i < screen_count(); i++) scale(i, factor);
|
||||
if (factor) for (int i = 0; i < scount; i++) scale(i, factor);
|
||||
Fl::add_handler(Fl_Screen_Driver::scale_handler);
|
||||
int mx, my;
|
||||
int ns = Fl::screen_driver()->get_mouse(mx, my);
|
||||
|
|
Loading…
Reference in New Issue