[LinksOS CVS Commit]kernel/hw/video vga.cpp,NONE,1.1
Status: Inactive
Brought to you by:
terencevs
|
From: <bl...@to...> - 2003-01-17 23:14:39
|
Update of /cvsroot/linksos/kernel/hw/video In directory rix.tossell.net:/tmp/cvs-serv31305 Added Files: vga.cpp Log Message: Title: vga.cpp // basic 13h driver . Will use vga.h and later svgalib Changes: first commit Effects: None, commented enough for later a= blokkie (tfe...@wa... b= --- NEW FILE: vga.cpp --- /* This program set the video mode to 13h , later it must use SVGALIB /usr/local/include/ should be in the path. So, <vga.h> works */ #include <stdio.h> //should be in the CVS-tree ASAP #include <vga.h> // this is needed .. but as vga.h is not done yet bare with me int main(void) { int prevMode; //holds the preveus video mode. int myMode = G320x240x256; //holds the new mode 13h. prevMode = vga_getcurrentmode(); //puts the current mode into prevMode. vga_init(); //initizalizes the vga function. if(vga_hasmode(myMode)) vga_setmode(myMode); //returns if a video mode is saported. else return 1; //sets mode 13h. while(!vga_getkey()); //wates for a key to be pressed. vga_setmode(prevMode); //sets the video mode to the previus mode. return 0; } |