View Raw SPL

/* returns width and height of screen in pixels */
getscreensize(unscaled = 1, taskbar = 0)
{
        local mode, h, w, dpiscale;

        /* getwscoords mode, -2:subtract taskbar, -3: fullscreen */
        mode = taskbar ? -2 : -3;

        (w, h) = getwscoords(mode);

        if (unscaled)
        {
                /* return actual number of pixels */
                dpiscale = osstatus("dpiscale");

                w *= dpiscale;
                h *= dpiscale;
        }

        return(w, h);
}