aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/fb/splash_bmp.c15
-rw-r--r--sys/dev/syscons/scvidctl.c4
-rw-r--r--sys/dev/syscons/syscons.c4
3 files changed, 12 insertions, 11 deletions
diff --git a/sys/dev/fb/splash_bmp.c b/sys/dev/fb/splash_bmp.c
index ac547dca3923..71e25784720e 100644
--- a/sys/dev/fb/splash_bmp.c
+++ b/sys/dev/fb/splash_bmp.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: splash_bmp.c,v 1.4 1999/01/21 18:29:33 yokota Exp $
+ * $Id: splash_bmp.c,v 1.5 1999/01/26 10:00:02 yokota Exp $
*/
#include <sys/param.h>
@@ -216,14 +216,14 @@ fill(BMP_INFO *info, int x, int y, int xsize, int ysize)
int p;
banksize = info->adp->va_window_size;
- bank = (info->swidth*y + x)/banksize;
+ bank = (info->adp->va_line_width*y + x)/banksize;
window = (u_char *)info->adp->va_window;
(*vidsw[info->adp->va_index]->set_win_org)(info->adp, bank*banksize);
while (ysize > 0) {
- p = (info->swidth*y + x)%banksize;
+ p = (info->adp->va_line_width*y + x)%banksize;
for (; (p + xsize <= banksize) && ysize > 0; --ysize, ++y) {
generic_bzero(window + p, xsize);
- p += info->swidth;
+ p += info->adp->va_line_width;
}
if (ysize <= 0)
break;
@@ -267,11 +267,11 @@ bmp_SetPix(BMP_INFO *info, int x, int y, u_char val)
* because 0,0 is bottom-left for DIB, we have to convert.
*/
sofs = ((info->height - (y+1) + (info->sheight - info->height) / 2)
- * info->swidth) + x + (info->swidth - info->width) / 2;
+ * info->adp->va_line_width);
switch(info->sdepth) {
case 1:
- sofs = sofs >> 3; /* correct for depth */
+ sofs += ((x + (info->swidth - info->width) / 2) >> 3);
bofs = x & 0x7; /* offset within byte */
val &= 1; /* mask pixel value */
@@ -282,7 +282,7 @@ bmp_SetPix(BMP_INFO *info, int x, int y, u_char val)
/* XXX only correct for non-interleaved modes */
case 4:
- sofs = sofs >> 1; /* correct for depth */
+ sofs += ((x + (info->swidth - info->width) / 2) >> 1);
bofs = x & 0x1; /* offset within byte */
val &= 0xf; /* mask pixel value */
@@ -292,6 +292,7 @@ bmp_SetPix(BMP_INFO *info, int x, int y, u_char val)
break;
case 8:
+ sofs += x + (info->swidth - info->width) / 2;
newbank = sofs/info->adp->va_window_size;
if (info->bank != newbank) {
(*vidsw[info->adp->va_index]->set_win_org)(info->adp, newbank*info->adp->va_window_size);
diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c
index 837402897470..732f386c05bc 100644
--- a/sys/dev/syscons/scvidctl.c
+++ b/sys/dev/syscons/scvidctl.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: scvidctl.c,v 1.6 1999/01/11 03:18:26 yokota Exp $
+ * $Id: scvidctl.c,v 1.7 1999/01/19 11:31:16 yokota Exp $
*/
#include "sc.h"
@@ -392,11 +392,11 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
((video_adapter_info_t *)data)->va_buffer_size
= scp->adp->va_buffer_size;
((video_adapter_info_t *)data)->va_mode = scp->adp->va_mode;
- ((video_adapter_info_t *)data)->va_mode_flags = scp->adp->va_mode_flags;
((video_adapter_info_t *)data)->va_initial_mode
= scp->adp->va_initial_mode;
((video_adapter_info_t *)data)->va_initial_bios_mode
= scp->adp->va_initial_bios_mode;
+ ((video_adapter_info_t *)data)->va_line_width = scp->adp->va_line_width;
return 0;
case CONS_GET: /* get current video mode */
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index ebe15a0fcf02..1e3f5e090955 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.296 1999/01/28 17:31:58 dillon Exp $
+ * $Id: syscons.c,v 1.297 1999/01/30 12:17:30 phk Exp $
*/
#include "sc.h"
@@ -2327,7 +2327,7 @@ set_scrn_saver_mode(scr_stat *scp, int mode, u_char *pal, int border)
return 0;
scp->mode = mode;
if (set_mode(scp) == 0) {
- if (scp->adp->va_mode_flags & V_INFO_GRAPHICS)
+ if (scp->adp->va_info.vi_flags & V_INFO_GRAPHICS)
scp->status |= GRAPHICS_MODE;
if (pal != NULL)
load_palette(scp->adp, pal);