aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/framebuffer.cc11
-rw-r--r--src/drivers/psftext.cc1
2 files changed, 9 insertions, 3 deletions
diff --git a/src/drivers/framebuffer.cc b/src/drivers/framebuffer.cc
index 33b73d6..ecc4869 100644
--- a/src/drivers/framebuffer.cc
+++ b/src/drivers/framebuffer.cc
@@ -38,9 +38,14 @@ void framebuffer_scrollup(u32 npixel){
for(u32 y=0;y<fb_cfg.height;y++){
if(npixel<fb_cfg.height){
for(u32 x=0;x<fb_cfg.width;x++){
- u32 *pixel_dst=(u32*)(fb_cfg.location+x*(fb_cfg.depth/8)+y*fb_cfg.pitch);
- u32 *pixel_src=(u32*)(fb_cfg.location+x*(fb_cfg.depth/8)+npixel*fb_cfg.pitch);
- *pixel_dst=*pixel_src; // Faster than writing pixel by pixel
+ u8 *pixel_dst=(u8*)(fb_cfg.location+x*(fb_cfg.depth/8)+y*fb_cfg.pitch);
+ u8 *pixel_src=(u8*)(fb_cfg.location+x*(fb_cfg.depth/8)+npixel*fb_cfg.pitch);
+ pixel_dst[0]=pixel_src[0];
+ pixel_dst[1]=pixel_src[1];
+ pixel_dst[2]=pixel_src[2];
+ if(fb_cfg.depth==32)
+ pixel_dst[3]=pixel_src[3];
+
}
}
else{
diff --git a/src/drivers/psftext.cc b/src/drivers/psftext.cc
index 1df4dd3..d0094d8 100644
--- a/src/drivers/psftext.cc
+++ b/src/drivers/psftext.cc
@@ -58,6 +58,7 @@ void psftext_putchar(char c){
}
glyph+=psf_status.header.glyph_width/8;
}
+
psf_status.x++;
if(psf_status.x>psf_status.nchar){
psf_status.y++;